From d823b8b40d50cb6cffd32def57c977ca4cc9f35f Mon Sep 17 00:00:00 2001 From: Gristlebee <56049844+Gristlebee@users.noreply.github.com> Date: Fri, 31 May 2024 04:57:46 -0700 Subject: [PATCH 1/4] Constructable Suit Storage Units (#3027) ## About The Pull Request Suit storage units now have circuit boards and require four microlasers, and can be constructed and deconstructed like most machines. Better microlasers reduce how long decontamination takes. Adds examine messages for stock part efficiency and locks. Adds suit storage units boards to Industrial engineering. Changes the span classes to macros ## Why It's Good For The Game This should improve quality of life in how you want to layout your ship with being able to freely move the suit storage units around , or install more as needed instead of just permanently destroying them. ## Changelog :cl: add: Suit Storage Unit construction add: Added suit storage unit circuit boards to industrial engineering tech tweak: Suit storage unit examines tweak: span class to span macros in suit_storage.dm /:cl: --- code/game/machinery/suit_storage_unit.dm | 97 +++++++++++++------ .../circuitboards/machine_circuitboards.dm | 6 ++ .../research/designs/machine_designs.dm | 7 ++ code/modules/research/techweb/all_nodes.dm | 2 +- 4 files changed, 79 insertions(+), 33 deletions(-) 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 From 3fe974ec1275b1d2f229841861c8f80071bb8da4 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Fri, 31 May 2024 07:08:33 -0500 Subject: [PATCH 2/4] Automatic changelog generation for PR #3027 [ci skip] --- html/changelogs/AutoChangeLog-pr-3027.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3027.yml diff --git a/html/changelogs/AutoChangeLog-pr-3027.yml b/html/changelogs/AutoChangeLog-pr-3027.yml new file mode 100644 index 000000000000..2360e7f949a8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3027.yml @@ -0,0 +1,7 @@ +author: Gristlebee +changes: + - {rscadd: Suit Storage Unit construction} + - {rscadd: Added suit storage unit circuit boards to industrial engineering tech} + - {tweak: Suit storage unit examines} + - {tweak: span class to span macros in suit_storage.dm} +delete-after: true From 5d4c3e5bdbaa62d965dc7b02766686c7dab6a8a5 Mon Sep 17 00:00:00 2001 From: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Date: Fri, 31 May 2024 08:15:02 -0500 Subject: [PATCH 3/4] tweaks to new ore (#3045) ## About The Pull Request removes it from the orm but adds it as a valid material in the autolathe! make a cool toolbox! ## Why It's Good For The Game ## Changelog :cl: tweak: tweaked the new ore /:cl: --- code/game/machinery/autolathe.dm | 2 +- code/modules/mining/machine_redemption.dm | 2 +- code/modules/mining/machine_silo.dm | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 5e61d276b226..e63b3f75fb2b 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -51,7 +51,7 @@ ) /obj/machinery/autolathe/Initialize() - AddComponent(/datum/component/material_container,list(/datum/material/iron, /datum/material/glass, /datum/material/plastic, /datum/material/silver, /datum/material/gold, /datum/material/plasma, /datum/material/uranium, /datum/material/titanium), 0, TRUE, null, null, CALLBACK(src, PROC_REF(AfterMaterialInsert))) + AddComponent(/datum/component/material_container,list(/datum/material/iron, /datum/material/glass, /datum/material/plastic, /datum/material/silver, /datum/material/gold, /datum/material/plasma, /datum/material/uranium, /datum/material/titanium, /datum/material/hellstone), 0, TRUE, null, null, CALLBACK(src, PROC_REF(AfterMaterialInsert))) . = ..() wires = new /datum/wires/autolathe(src) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 65aea8732d03..d0704887b4ea 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -17,7 +17,7 @@ var/points = 0 var/ore_multiplier = 1 var/point_upgrade = 1 - var/list/ore_values = list(/datum/material/iron = 1, /datum/material/glass = 1, /datum/material/plasma = 15, /datum/material/silver = 16, /datum/material/gold = 18, /datum/material/titanium = 30, /datum/material/uranium = 30, /datum/material/diamond = 50, /datum/material/bluespace = 50, /datum/material/hellstone = 60) + var/list/ore_values = list(/datum/material/iron = 1, /datum/material/glass = 1, /datum/material/plasma = 15, /datum/material/silver = 16, /datum/material/gold = 18, /datum/material/titanium = 30, /datum/material/uranium = 30, /datum/material/diamond = 50, /datum/material/bluespace = 50) /// Variable that holds a timer which is used for callbacks to `send_console_message()`. Used for preventing multiple calls to this proc while the ORM is eating a stack of ores. var/console_notify_timer var/datum/techweb/stored_research diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index 6a210f4d87ff..444e72992685 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -25,7 +25,6 @@ GLOBAL_LIST_EMPTY(silo_access_logs) /datum/material/titanium, /datum/material/bluespace, /datum/material/plastic, - /datum/material/hellstone, ) AddComponent(/datum/component/material_container, materials_list, INFINITY, allowed_types=/obj/item/stack, _disable_attackby=TRUE) From ff1b4cb681980d03f32c2717ea39bd79ed9cc139 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Fri, 31 May 2024 08:26:12 -0500 Subject: [PATCH 4/4] Automatic changelog generation for PR #3045 [ci skip] --- html/changelogs/AutoChangeLog-pr-3045.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3045.yml diff --git a/html/changelogs/AutoChangeLog-pr-3045.yml b/html/changelogs/AutoChangeLog-pr-3045.yml new file mode 100644 index 000000000000..7557baf6ddf7 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3045.yml @@ -0,0 +1,4 @@ +author: FalloutFalcon +changes: + - {tweak: tweaked the new ore} +delete-after: true