From 2dcf8c7b5a0e7c50d5de8be3bdbc740763cd7f7b Mon Sep 17 00:00:00 2001 From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:33:41 -0400 Subject: [PATCH] Adds Autoclaves (#32000) * Adds Autoclaves * Recolor * Update code/modules/research/designs/machine_designs.dm Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Update code/game/machinery/machine_frame.dm Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> --------- Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- _maps/map_files/stations/boxstation.dmm | 6 +- _maps/map_files/stations/cerestation.dmm | 17 +- _maps/map_files/stations/deltastation.dmm | 2 + _maps/map_files/stations/emeraldstation.dmm | 12 +- _maps/map_files/stations/metastation.dmm | 2 + code/game/machinery/autoclave.dm | 256 ++++++++++++++++++ code/game/machinery/machine_frame.dm | 11 + .../research/designs/machine_designs.dm | 10 + icons/obj/machines/autoclave.dmi | Bin 0 -> 1209 bytes paradise.dme | 1 + 10 files changed, 304 insertions(+), 13 deletions(-) create mode 100644 code/game/machinery/autoclave.dm create mode 100644 icons/obj/machines/autoclave.dmi diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm index ddc104c7720..5d69902743a 100644 --- a/_maps/map_files/stations/boxstation.dmm +++ b/_maps/map_files/stations/boxstation.dmm @@ -45055,8 +45055,9 @@ layer = 4; pixel_x = -32 }, -/obj/structure/table/tray, /obj/effect/turf_decal/tiles/department/medical/corner, +/obj/structure/table/glass, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "dRP" = ( @@ -68495,13 +68496,13 @@ /area/station/security/main) "oiA" = ( /obj/item/storage/surgical_tray, -/obj/structure/table/glass, /obj/effect/turf_decal/tiles/department/medical/side{ dir = 4 }, /obj/machinery/light{ dir = 8 }, +/obj/structure/table/tray, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "oiD" = ( @@ -90162,6 +90163,7 @@ pixel_x = -28 }, /obj/effect/turf_decal/tiles/department/medical/corner, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "xTR" = ( diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index f45c0e0223b..90e15b921b2 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -7544,8 +7544,8 @@ /obj/machinery/light{ dir = 4 }, -/obj/machinery/iv_drip, /obj/structure/disposalpipe/segment, +/obj/machinery/bodyscanner, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "bkJ" = ( @@ -7889,8 +7889,8 @@ /obj/structure/cable{ icon_state = "0-4" }, -/obj/structure/closet/secure_closet/medical2, /obj/machinery/light, +/obj/structure/closet/secure_closet/medical2, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "bmY" = ( @@ -9499,6 +9499,7 @@ /obj/structure/table/glass, /obj/item/clothing/gloves/color/latex/nitrile, /obj/effect/turf_decal/tiles/department/medical/corner, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/patients_rooms1) "byZ" = ( @@ -29174,6 +29175,9 @@ /area/station/maintenance/electrical/port) "eZE" = ( /obj/machinery/firealarm/directional/south, +/obj/machinery/bodyscanner{ + dir = 1 + }, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "eZF" = ( @@ -37563,9 +37567,8 @@ name = "west bump"; pixel_x = -28 }, -/obj/machinery/bodyscanner{ - dir = 4 - }, +/obj/structure/table, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "gXH" = ( @@ -61977,6 +61980,7 @@ /obj/effect/turf_decal/tiles/department/medical/corner{ dir = 8 }, +/obj/machinery/iv_drip, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "lXi" = ( @@ -95423,7 +95427,8 @@ pixel_x = 28; name = "custom placement" }, -/obj/machinery/bodyscanner, +/obj/structure/table, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "ttH" = ( diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm index 72023d3715f..e0efbdf6c2e 100644 --- a/_maps/map_files/stations/deltastation.dmm +++ b/_maps/map_files/stations/deltastation.dmm @@ -54164,6 +54164,7 @@ /obj/machinery/firealarm/directional/south, /obj/structure/table/glass, /obj/effect/turf_decal/tiles/department/medical/side, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "gaZ" = ( @@ -89766,6 +89767,7 @@ /obj/effect/turf_decal/tiles/department/medical/side{ dir = 1 }, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "ueR" = ( diff --git a/_maps/map_files/stations/emeraldstation.dmm b/_maps/map_files/stations/emeraldstation.dmm index 4d76198dfd8..74f4ce62428 100644 --- a/_maps/map_files/stations/emeraldstation.dmm +++ b/_maps/map_files/stations/emeraldstation.dmm @@ -59512,6 +59512,7 @@ /obj/effect/turf_decal/tiles/department/medical/side{ dir = 4 }, +/obj/item/reagent_containers/iv_bag/salglu, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "lVG" = ( @@ -72953,10 +72954,6 @@ /area/station/medical/morgue) "oBj" = ( /obj/structure/table/glass, -/obj/item/reagent_containers/spray/cleaner{ - desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; - name = "Surgery Cleaner" - }, /obj/machinery/defibrillator_mount/loaded{ pixel_x = 30 }, @@ -72964,6 +72961,7 @@ /obj/effect/turf_decal/tiles/department/medical/corner{ dir = 1 }, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "oBl" = ( @@ -82342,6 +82340,7 @@ /obj/effect/turf_decal/tiles/department/medical/corner{ dir = 4 }, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/primary) "qsh" = ( @@ -110181,7 +110180,6 @@ /area/station/service/chapel) "vQU" = ( /obj/structure/table/glass, -/obj/item/reagent_containers/iv_bag/salglu, /obj/item/radio/intercom{ name = "east bump"; pixel_x = 28 @@ -110189,6 +110187,10 @@ /obj/effect/turf_decal/tiles/department/medical/side{ dir = 8 }, +/obj/item/reagent_containers/spray/cleaner{ + desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; + name = "Surgery Cleaner" + }, /turf/simulated/floor/plasteel/white, /area/station/medical/surgery/secondary) "vRf" = ( diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index 904944b97a8..a8e842379ee 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -21816,6 +21816,7 @@ /obj/effect/turf_decal/tiles/department/command/side{ dir = 1 }, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/dark, /area/station/medical/surgery/primary) "cuV" = ( @@ -26051,6 +26052,7 @@ /obj/effect/turf_decal/tiles/department/command/side{ dir = 1 }, +/obj/machinery/autoclave, /turf/simulated/floor/plasteel/dark, /area/station/medical/surgery/secondary) "cRt" = ( diff --git a/code/game/machinery/autoclave.dm b/code/game/machinery/autoclave.dm new file mode 100644 index 00000000000..03ed3201f62 --- /dev/null +++ b/code/game/machinery/autoclave.dm @@ -0,0 +1,256 @@ +/obj/machinery/autoclave + name = "autoclave" + desc = "A pressurized chamber used to eliminate bacteria." + + icon = 'icons/obj/machines/autoclave.dmi' + base_icon_state = "autoclave" + icon_state = "autoclave" + + active_power_consumption = 5000 + idle_power_consumption = 5 + + /// Time to sanitize the item inside + var/sanitize_time = 30 SECONDS + + /// Alpha mask for the contained item sprite + var/static/alpha_mask_filter + + /// Is the door open + var/is_open = FALSE + + /// Sound to play + var/datum/looping_sound/kitchen/microwave/soundloop + + /// Timer ID for the actual work. Can be used to check if the machine is "busy" + var/work_timer_id + + /// What is currently inside the autoclave + var/obj/item/occupant + /// Visual + var/obj/effect/occupant_overlay + +/obj/machinery/autoclave/Initialize(mapload) + . = ..() + soundloop = new(src) + alpha_mask_filter ||= filter(type = "alpha", icon = icon(icon, "alphamask")) + update_appearance(UPDATE_OVERLAYS) + // Stock parts + component_parts = list() + component_parts += new /obj/item/circuitboard/autoclave(src) + component_parts += new /obj/item/stock_parts/micro_laser(src) + component_parts += new /obj/item/stock_parts/micro_laser(src) + component_parts += new /obj/item/stack/sheet/glass(src) + RefreshParts() + +/obj/machinery/autoclave/Destroy() + QDEL_NULL(soundloop) + if(occupant) + occupant.forceMove(get_turf(src)) + return ..() + +/obj/machinery/autoclave/examine(mob/user, infix, suffix) + . = ..() + . += SPAN_NOTICE("You can open or close [src] with an empty hand.") + . += SPAN_NOTICE("You can turn on [src] if it's closed or take an item out of [src] if it is open with by alt-clicking.") + if(occupant) + . += SPAN_INFO("There is \a [occupant] inside.") + if(emagged) + . += SPAN_WARNING("A bright red radiation warning light blinks on the display.") + +/obj/machinery/autoclave/RefreshParts() + . = ..() + var/average_level = 0 + for(var/obj/item/stock_parts/component in component_parts) + average_level += component.rating + average_level = average_level / 2 + // Update our values + sanitize_time = 30 SECONDS / average_level + +/obj/machinery/autoclave/emag_act(mob/user) + . = ..() + if(emagged) + return + to_chat(user, SPAN_WARNING("You short out [src]'s radiation controller!")) + do_sparks(2, 0, src) + emagged = TRUE + +/obj/machinery/autoclave/update_icon_state() + . = ..() + if(panel_open) + icon_state = "autoclave-open" + return + icon_state = "autoclave" + +/obj/machinery/autoclave/update_overlays() + . = ..() + overlays.Cut() + if(is_open) + if(occupant) + var/mutable_appearance/content_copy = new /mutable_appearance(occupant) + content_copy.layer = FLOAT_LAYER + content_copy.plane = FLOAT_PLANE + content_copy.pixel_x = 0 + content_copy.pixel_y = 0 + content_copy.appearance_flags |= KEEP_TOGETHER + content_copy.filters += alpha_mask_filter + . += content_copy + . += image(icon, "door-open") + else + . += image(icon, "door-closed") + + if((stat & NOPOWER) || (stat & BROKEN)) + . += image(icon, "lights-off") + else if(work_timer_id) + . += image(icon, "lights-green") + . += emissive_appearance(icon, "lights-green-emi", alpha = 90) + else + . += image(icon, "lights-red") + . += emissive_appearance(icon, "lights-red-emi", alpha = 90) + +/obj/machinery/autoclave/proc/toggle_light() + if(power_state == ACTIVE_POWER_USE) + light_color = "#DEEFFF" + light_power = 0.8 + light_range = 2.5 + return + light_color = "#FFFFFF" + light_power = 0 + light_range = 0 + +/obj/machinery/autoclave/AltClick(mob/user, modifiers) + if(!Adjacent(user)) + return + + if(is_open && occupant) + add_fingerprint(user) + user.put_in_active_hand(occupant) + to_chat(user, SPAN_NOTICE("You take [occupant] out of [src].")) + occupant = null + update_appearance(UPDATE_OVERLAYS) + + else if(!is_open && try_start()) + add_fingerprint(user) + +/obj/machinery/autoclave/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!Adjacent(user)) + return ITEM_INTERACT_COMPLETE + + if(istype(used, /obj/item/card/emag)) + return ..() + + if(user.a_intent != INTENT_HELP) + return ..() + + if(!is_open) + to_chat(user, SPAN_WARNING("The door on [src] is closed!")) + return ITEM_INTERACT_COMPLETE + + if(used.w_class > WEIGHT_CLASS_NORMAL) + to_chat(user, SPAN_WARNING("[used] is too big to fit in [src].")) + return ITEM_INTERACT_COMPLETE + + if(used.flags & NODROP || !user.transfer_item_to(used, src)) + to_chat(user, SPAN_WARNING("[used] is stuck to your hand!")) + return ITEM_INTERACT_COMPLETE + if(occupant) + user.put_in_active_hand(occupant) + to_chat(user, SPAN_NOTICE("You swap [used] with [occupant] in [src].")) + else + to_chat(user, SPAN_NOTICE("You insert [used] into [src].")) + occupant = used + user.visible_message(SPAN_NOTICE("[user] places [used] into [src].")) + update_appearance(UPDATE_OVERLAYS) + return ITEM_INTERACT_COMPLETE + +/obj/machinery/autoclave/screwdriver_act(mob/user, obj/item/I) + if(!I.use_tool(src, user, 0, volume = 0)) + return + . = TRUE + if(work_timer_id) + to_chat(user, SPAN_ALERT("[src] is busy. Please wait for completion of previous operation.")) + return + default_deconstruction_screwdriver(user, "autoclave-open", "autoclave", I) + update_appearance(UPDATE_ICON_STATE) + +/obj/machinery/autoclave/crowbar_act(mob/living/user, obj/item/I) + if(default_deconstruction_crowbar(user, I)) + return TRUE + +/obj/machinery/autoclave/wrench_act(mob/living/user, obj/item/I) + if(!I.use_tool(src, user, 0, volume = 0)) + return + . = TRUE + default_unfasten_wrench(user, I, 0) + +/obj/machinery/autoclave/attack_hand(mob/user, params) + if(.) + return + + if(work_timer_id) + to_chat(user, SPAN_WARNING("[src] is locked.")) + return TRUE + + toggle_open() + + return TRUE + +/obj/machinery/autoclave/proc/try_start() + if(work_timer_id || !occupant || panel_open) + return FALSE + + soundloop.start() + work_timer_id = addtimer(CALLBACK(src, PROC_REF(try_stop)), sanitize_time, TIMER_DELETE_ME | TIMER_STOPPABLE) + change_power_mode(ACTIVE_POWER_USE) + update_appearance(UPDATE_OVERLAYS) + return TRUE + +/obj/machinery/autoclave/proc/try_stop() + if(!work_timer_id) + return FALSE + + if(occupant) + sanitize() + + deltimer(work_timer_id) + work_timer_id = null + + soundloop.stop() + change_power_mode(IDLE_POWER_USE) + update_appearance(UPDATE_OVERLAYS) + toggle_light() + return TRUE + +/obj/machinery/autoclave/proc/sanitize() + var/obj/item/I = occupant + if(istype(I, /obj/item/holder)) + for(var/mob/M in src.contents) + M.forceMove(get_turf(src)) + M.gib() + qdel(occupant) + occupant = null + return + var/list/stored_items = I.get_all_contents() + var/mob_death = FALSE + for(var/obj/item/holder/H in stored_items) + for(var/mob/M in src.contents) + M.forceMove(get_turf(src)) + M.gib() + qdel(H) + mob_death = TRUE + if(mob_death) + return + for(var/obj/item/stored in stored_items) + stored.germ_level = 0 + stored.clean_blood() + I.germ_level = 0 + I.clean_blood() + if(emagged) + I.contaminate_atom(src, 150, BETA_RAD) + +/obj/machinery/autoclave/proc/toggle_open() + is_open = !is_open + if(is_open) + playsound(get_turf(src), 'sound/items/taperecorder/taperecorder_open.ogg', 30, TRUE) + else + playsound(get_turf(src), 'sound/items/taperecorder/taperecorder_close.ogg', 30, TRUE) + update_appearance(UPDATE_OVERLAYS) diff --git a/code/game/machinery/machine_frame.dm b/code/game/machinery/machine_frame.dm index c572b9c10b3..f1170d39a40 100644 --- a/code/game/machinery/machine_frame.dm +++ b/code/game/machinery/machine_frame.dm @@ -772,6 +772,17 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/manipulator = 2, /obj/item/stock_parts/matter_bin = 1) +/obj/item/circuitboard/autoclave + board_name = "Autoclave" + icon_state = "medical" + build_path = /obj/machinery/autoclave + board_type = "machine" + origin_tech = "biotech=2;materials=2;magnets=3" + req_components = list( + /obj/item/stock_parts/micro_laser = 2, + /obj/item/stack/sheet/glass = 1 + ) + /obj/item/circuitboard/scientific_analyzer // fucking US spelling board_name = "Scientific Analyzer" icon_state = "science" diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index d678167b9e2..9dd5b7924dd 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -261,6 +261,16 @@ build_path = /obj/item/circuitboard/reagentgrinder category = list ("Medical Machinery") +/datum/design/autoclave + name = "Machine Design (Autoclave)" + desc = "The circuit board for an Autoclave." + id = "reagentgrinder" + req_tech = list("biotech" = 2, "materials" = 3, "magnets" = 4) + build_type = IMPRINTER + materials = list(MAT_GLASS = 1000) + build_path = /obj/item/circuitboard/autoclave + category = list ("Medical Machinery") + /datum/design/sleeper name = "Machine Board (Sleeper)" desc = "Allows for the construction of circuit boards used to build a Sleeper." diff --git a/icons/obj/machines/autoclave.dmi b/icons/obj/machines/autoclave.dmi new file mode 100644 index 0000000000000000000000000000000000000000..49f97cd948d2454713754baaf6dd0d25505de370 GIT binary patch literal 1209 zcmeAS@N?(olHy`uVBq!ia0vp^4M3d0!3HF+R#kZdsdZH$5hX6E#mPmP1tppJc?=8{ zbEZz*%hznc)AIa@rqYbyula9-8nxO!@rfC#WF64(eEHg3S0~o%#=AA=KfRpOon5&) zEAWoC-NMgpY=wf)@6OviJds9R?lkv@ph3x-5*1yd^ zy;I}$qu+1LuLn)KoutAM!N9wzWv$*ATD@@Ov^lZ5 za;H+}2kDvHAOHAU_uymA=`+92?)zzBoL~7_ZR4(8t0rV-Wfe)?|N7Pbsfkq~A1gyU zQ-d?(frShY0vHN37%W5>=3HLK{XqEVp9&4n>8E>DAL(`L-eBU8lzb-~x-T>8I#AgS zR*8W77c{)SKfHT;hIbM_mx4-cwEDV;x!1%s8XD%kJ7+L+O;DBb$n2!eFI5S-Qnl&rGCI#B8 zxV$K2Sx}tE0lkL)R^b$I=*n<0AP4$^{{k(1(a?}blY>PFTsS#5>BOhA{{qhUpZ_*5 z`18t@o6bMgKWaW#KEM0YpFds4jnCan-e5Y3*LS`Be0GN8QQQHurmtJB`FiH6ZRfJ3 z;)PinKX32+(e%~uz;gZ1+x#^Tef?7tpD512_nrwk0l@7;P8a9yi*)^4+rLS4*xxD{hm=JdjuPfG>6AJ)H*NLm|HTl{Lw^) zm$$46kG|UC(k9OIqE%w@Nv);klWm^H9k}V`l{&Mk=*RJ79Vatx|FjeK2JWV z`aQdZjBfbEJ;%Gn9Gp(yaoM78q1T>YQ7EpEd1`z4I@jB8r;9$adBU=l;rlXs_utE7 zfB8LJeEU$vkxsz}uJ5nCi(gYCJZHax(1b1JNDh(uiwji&2<~LIGIMx z*m1fz=z~*3>r~UNaXMY>rBPE(g>(sVd|1TYA$b%7 literal 0 HcmV?d00001 diff --git a/paradise.dme b/paradise.dme index a62176b1333..c11a73be746 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1037,6 +1037,7 @@ #include "code\game\machinery\ai_display.dm" #include "code\game\machinery\ai_resource.dm" #include "code\game\machinery\ai_slipper.dm" +#include "code\game\machinery\autoclave.dm" #include "code\game\machinery\autolathe.dm" #include "code\game\machinery\Beacon.dm" #include "code\game\machinery\buttons.dm"