Showers clean contamination and make sound (#31773)
* fucking showers * cleanup
This commit is contained in:
committed by
CitadelStationBot
parent
02fcc06eb1
commit
ee3d18fe58
@@ -199,7 +199,15 @@
|
||||
var/obj/effect/mist/mymist = null
|
||||
var/ismist = 0 //needs a var so we can make it linger~
|
||||
var/watertemp = "normal" //freezing, normal, or boiling
|
||||
var/datum/looping_sound/showering/soundloop
|
||||
|
||||
/obj/machinery/shower/Initialize()
|
||||
. = ..()
|
||||
soundloop = new(list(src), FALSE)
|
||||
|
||||
/obj/machinery/shower/Destroy()
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/obj/effect/mist
|
||||
name = "mist"
|
||||
@@ -215,6 +223,7 @@
|
||||
update_icon()
|
||||
add_fingerprint(M)
|
||||
if(on)
|
||||
soundloop.start()
|
||||
wash_turf()
|
||||
for(var/atom/movable/G in loc)
|
||||
if(isliving(G))
|
||||
@@ -223,6 +232,7 @@
|
||||
else if(isobj(G)) // Skip the light objects
|
||||
wash_obj(G)
|
||||
else
|
||||
soundloop.stop()
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
@@ -368,6 +378,15 @@
|
||||
else
|
||||
L.clean_blood()
|
||||
|
||||
/obj/machinery/shower/proc/contamination_cleanse(atom/movable/thing)
|
||||
var/datum/component/radioactive/healthy_green_glow = thing.GetComponent(/datum/component/radioactive)
|
||||
if(!healthy_green_glow || QDELETED(healthy_green_glow))
|
||||
return
|
||||
var/strength = healthy_green_glow.strength
|
||||
if(strength <= RAD_BACKGROUND_RADIATION)
|
||||
qdel(healthy_green_glow)
|
||||
return
|
||||
healthy_green_glow.strength = max(strength-1, 0)
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
if(on)
|
||||
@@ -377,6 +396,7 @@
|
||||
wash_mob(AM)
|
||||
else if(isobj(AM))
|
||||
wash_obj(AM)
|
||||
contamination_cleanse(AM)
|
||||
|
||||
/obj/machinery/shower/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/metal (loc, 3)
|
||||
|
||||
Reference in New Issue
Block a user