mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
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>
This commit is contained in:
co-authored by
CRUNCH
DGamerL
parent
83e3b3f6dc
commit
2dcf8c7b5a
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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)
|
||||
@@ -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"
|
||||
|
||||
@@ -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."
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user