Merge pull request #3499 from Citadel-Station-13/upstream-merge-31773

[MIRROR] Showers clean contamination and make sound
This commit is contained in:
LetterJay
2017-10-19 09:20:02 -04:00
committed by GitHub
9 changed files with 120 additions and 0 deletions
@@ -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)