diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 960df9263c81..ed734453202b 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -1,3 +1,5 @@ +#define BASE_UV_CYCLES 7 + // SUIT STORAGE UNIT ///////////////// /obj/machinery/suit_storage_unit name = "suit storage unit" @@ -9,6 +11,7 @@ use_power = IDLE_POWER_USE idle_power_usage = IDLE_DRAW_MINIMAL max_integrity = 250 + circuit = /obj/item/circuitboard/machine/suit_storage_unit var/obj/item/clothing/suit/space/suit = null var/obj/item/clothing/head/helmet/space/helmet = null @@ -42,7 +45,9 @@ */ var/uv_super = FALSE /// How many cycles remain for the decontamination sequence. - var/uv_cycles = 6 + var/uv_cycles = 7 + /// Time reduction from stock parts + var/lasers_bonus = 0 /// Cooldown for occupant breakout messages via relaymove() var/message_cooldown /// How long it takes to break out of the SSU. @@ -193,6 +198,19 @@ storage = new storage_type(src) update_appearance() +/obj/machinery/suit_storage_unit/examine(mob/user) + . = ..() + . += span_notice("Number of UV cycles reduced by [lasers_bonus].") + if(locked) + . += span_notice("The locking bolts on \the [src] are engaged, preventing it from being pried open.") + +/obj/machinery/suit_storage_unit/RefreshParts() + lasers_bonus = 0 + for(var/obj/item/stock_parts/micro_laser/lasers in component_parts) + lasers_bonus += ((lasers.rating) * 0.25) + + uv_cycles = BASE_UV_CYCLES - lasers_bonus + /obj/machinery/suit_storage_unit/Destroy() QDEL_NULL(suit) QDEL_NULL(helmet) @@ -252,7 +270,15 @@ if(!(flags_1 & NODECONSTRUCT_1)) open_machine() dump_contents() - new /obj/item/stack/sheet/metal (loc, 2) + on_deconstruction() + if(circuit) + circuit.forceMove(loc) + circuit = null + if(length(component_parts)) + spawn_frame(disassembled) + for(var/obj/item/I in component_parts) + I.forceMove(loc) + component_parts.Cut() qdel(src) /obj/machinery/suit_storage_unit/interact(mob/living/user) @@ -320,7 +346,7 @@ else if (occupant) var/mob/living/mob_occupant = occupant - to_chat(mob_occupant, "[src]'s confines grow warm, then hot, then scorching. You're being burned [!mob_occupant.stat ? "alive" : "away"]!") + to_chat(mob_occupant, span_userdanger("[src]'s confines grow warm, then hot, then scorching. You're being burned [!mob_occupant.stat ? "alive" : "away"]!")) cook() if ("lock", "unlock") if (!state_open) @@ -366,27 +392,27 @@ return var/mob/living/target = A if(!state_open) - to_chat(user, "The unit's doors are shut!") + to_chat(user, span_warning("The unit's doors are shut!")) return if(!is_operational) - to_chat(user, "The unit is not operational!") + to_chat(user, span_warning("The unit is not operational!")) return if(occupant || helmet || suit || storage) - to_chat(user, "It's too cluttered inside to fit in!") + to_chat(user, span_warning("It's too cluttered inside to fit in!")) return if(target == user) - user.visible_message("[user] starts squeezing into [src]!", "You start working your way into [src]...") + user.visible_message(span_warning("[user] starts squeezing into [src]!"), span_notice("You start working your way into [src]...")) else - target.visible_message("[user] starts shoving [target] into [src]!", "[user] starts shoving you into [src]!") + target.visible_message(span_warning("[user] starts shoving [target] into [src]!"), span_userdanger("[user] starts shoving you into [src]!")) if(do_mob(user, target, 30)) if(occupant || helmet || suit || storage) return if(target == user) - user.visible_message("[user] slips into [src] and closes the door behind [user.p_them()]!", "You slip into [src]'s cramped space and shut its door.") + user.visible_message(span_warning("[user] slips into [src] and closes the door behind [user.p_them()]!"), span_notice("You slip into [src]'s cramped space and shut its door.")) else - target.visible_message("[user] pushes [target] into [src] and shuts its door!", "[user] shoves you into [src] and shuts the door!") + target.visible_message(span_warning("[user] pushes [target] into [src] and shuts its door!"), span_userdanger("[user] shoves you into [src] and shuts the door!")) close_machine(target) add_fingerprint(user) @@ -400,7 +426,7 @@ */ /obj/machinery/suit_storage_unit/proc/cook() var/mob/living/mob_occupant = occupant - if(uv_cycles) + if(uv_cycles > 0) uv_cycles-- uv = TRUE locked = TRUE @@ -414,11 +440,11 @@ mob_occupant.emote("scream") addtimer(CALLBACK(src, PROC_REF(cook)), 50) else - uv_cycles = initial(uv_cycles) + uv_cycles = (BASE_UV_CYCLES - lasers_bonus) uv = FALSE locked = FALSE if(uv_super) - visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.") + visible_message(span_warning("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.")) playsound(src, 'sound/machines/creaking.ogg', 50, TRUE) helmet = null qdel(helmet) @@ -432,9 +458,9 @@ wires.cut_all() else if(!occupant) - visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.") + visible_message(span_notice("[src]'s door slides open. The glowing yellow lights dim to a gentle green.")) else - visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.") + visible_message(span_warning("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.")) mob_occupant.radiation = 0 playsound(src, 'sound/machines/airlocks/standard/close.ogg', 25, TRUE) var/list/things_to_clear = list() //Done this way since using GetAllContents on the SSU itself would include circuitry and such. @@ -472,7 +498,7 @@ if(locked) if(message_cooldown <= world.time) message_cooldown = world.time + 50 - to_chat(user, "[src]'s door won't budge!") + to_chat(user, span_warning("[src]'s door won't budge!")) return open_machine() dump_contents() @@ -484,21 +510,21 @@ return user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - user.visible_message("You see [user] kicking against the doors of [src]!", \ - "You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)", \ - "You hear a thump from [src].") + user.visible_message(span_notice("You see [user] kicking against the doors of [src]!"), \ + span_notice("You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)"), \ + span_hear("You hear a thump from [src].")) if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src) return - user.visible_message("[user] successfully broke out of [src]!", \ - "You successfully break out of [src]!") + user.visible_message(span_warning("[user] successfully broke out of [src]!"), \ + span_notice("You successfully break out of [src]!")) open_machine() dump_contents() add_fingerprint(user) if(locked) - visible_message("You see [user] kicking against the doors of [src]!", \ - "You start kicking against the doors...") + visible_message(span_notice("You see [user] kicking against the doors of [src]!"), \ + span_notice("You start kicking against the doors...")) addtimer(CALLBACK(src, PROC_REF(resist_open), user), 300) else open_machine() @@ -506,42 +532,42 @@ /obj/machinery/suit_storage_unit/proc/resist_open(mob/user) if(!state_open && occupant && (user in src) && user.stat == 0) // Check they're still here. - visible_message("You see [user] burst out of [src]!", \ - "You escape the cramped confines of [src]!") + visible_message(span_notice("You see [user] burst out of [src]!"), \ + span_notice("You escape the cramped confines of [src]!")) open_machine() /obj/machinery/suit_storage_unit/attackby(obj/item/I, mob/user, params) if(state_open && is_operational) if(istype(I, /obj/item/clothing/suit)) if(suit) - to_chat(user, "The unit already contains a suit!.") + to_chat(user, span_warning("The unit already contains a suit!.")) return if(!user.transferItemToLoc(I, src)) return suit = I else if(istype(I, /obj/item/clothing/head)) if(helmet) - to_chat(user, "The unit already contains a helmet!") + to_chat(user, span_warning("The unit already contains a helmet!")) return if(!user.transferItemToLoc(I, src)) return helmet = I else if(istype(I, /obj/item/clothing/mask)) if(mask) - to_chat(user, "The unit already contains a mask!") + to_chat(user, span_warning("The unit already contains a mask!")) return if(!user.transferItemToLoc(I, src)) return mask = I else if(storage) - to_chat(user, "The auxiliary storage compartment is full!") + to_chat(user, span_warning("The auxiliary storage compartment is full!")) return if(!user.transferItemToLoc(I, src)) return storage = I - visible_message("[user] inserts [I] into [src]", "You load [I] into [src].") + visible_message(span_notice("[user] inserts [I] into [src]"), span_notice("You load [I] into [src].")) update_appearance() return @@ -564,7 +590,7 @@ */ /obj/machinery/suit_storage_unit/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I) if(!(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_SCREWDRIVER && uv) - to_chat(user, "It might not be wise to fiddle with [src] while it's running...") + to_chat(user, span_warning("It might not be wise to fiddle with [src] while it's running...")) return TRUE return ..() @@ -573,8 +599,12 @@ . = !(state_open || panel_open || is_operational || locked || (flags_1 & NODECONSTRUCT_1)) && I.tool_behaviour == TOOL_CROWBAR if(.) I.play_tool_sound(src, 50) - visible_message("[usr] pries open \the [src].", "You pry open \the [src].") + visible_message(span_notice("[usr] pries open \the [src]."), span_notice("You pry open \the [src].")) open_machine() + // todo, make it not deconstruct while locked + if(!locked) + if(default_deconstruction_crowbar(I)) + return TRUE // Mapping helper unit takes whatever lies on top of it /obj/machinery/suit_storage_unit/inherit/Initialize(mapload) @@ -599,3 +629,6 @@ AM.forceMove(src) storage = AM update_appearance() + + +#undef BASE_UV_CYCLES diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 1b8ffef10cd5..1a4a57d5cbb1 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1543,3 +1543,9 @@ /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/micro_laser = 2, ) + +/obj/item/circuitboard/machine/suit_storage_unit + name = "Suit Storage Unit" + icon_state = "engineering" + build_path = /obj/machinery/suit_storage_unit + req_components = list(/obj/item/stock_parts/micro_laser = 4) diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index e12db8a59738..6955bf525d29 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -9,6 +9,13 @@ build_path = /obj/item/circuitboard/machine/smes category = list ("Engineering Machinery") +/datum/design/board/ssu + name = "Machine Design (Suit Storage Unit Board)" + desc = "The circuit board for a suit storage unit." + id = "ssu" + build_path = /obj/item/circuitboard/machine/suit_storage_unit + category = list ("Engineering Machinery") + /datum/design/board/circulator name = "Machine Design (Circulator Board)" desc = "The circuit board for a circulator." diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index af76ef1d00fa..eaa696c8d775 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -183,7 +183,7 @@ prereq_ids = list("base") design_ids = list("solarcontrol", "solarassembly", "recharger", "powermonitor", "rped", "pacman", "adv_capacitor", "adv_scanning", "emitter", "high_cell", "adv_matter_bin", "scanner_gate", "atmosalerts", "atmos_control", "recycler", "autolathe", "high_micro_laser", "nano_mani", "mesons", "welding_goggles", "thermomachine", "rad_collector", "tesla_coil", "grounding_rod", - "apc_control", "cell_charger", "power control", "airlock_board", "firelock_board", "aac_electronics", "airalarm_electronics", "firealarm_electronics", "cell_charger", "stack_console", "stack_machine", + "apc_control", "cell_charger", "ssu", "power control", "airlock_board", "firelock_board", "aac_electronics", "airalarm_electronics", "firealarm_electronics", "cell_charger", "stack_console", "stack_machine", "oxygen_tank", "plasma_tank", "emergency_oxygen", "emergency_oxygen_engi", "plasmaman_tank_belt", "pneumatic_seal", "shieldwallgen", "shieldwallgen_atmos") //WS edit, solar assemblies from lathe research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) export_price = 5000