mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 03:51:49 +01:00
Shower related bug fixes (#20018)
 Fixed monkey cubes under showers from turning the game into Doom 3. Fixed showers not showering you because of an improper early return on wet floors. Fixed blood overlays being wrongly cleared when you shower. Sonme code improvements.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && reagents)
|
||||
|
||||
if (wet_things(T))
|
||||
if(!wet_things(T))
|
||||
break
|
||||
|
||||
if(T == get_turf(target))
|
||||
@@ -37,31 +37,34 @@
|
||||
|
||||
//Wets everything in the tile
|
||||
//A return value of 1 means that the wetting should stop. Either the water ran out or some error ocurred
|
||||
/**
|
||||
* Wets everything in the tile
|
||||
*
|
||||
* Returns `FALSE` if the water ran out or some error ocurred, or we should stop in general
|
||||
*/
|
||||
/obj/effect/effect/water/proc/wet_things(var/turf/T)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
if (!reagents || reagents.total_volume <= 0)
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
|
||||
reagents.touch_turf(T)
|
||||
var/list/mobshere = list()
|
||||
for (var/mob/living/L in T)
|
||||
mobshere.Add(L)
|
||||
for(var/atom/atom_in_turf as anything in T)
|
||||
if(isliving(atom_in_turf))
|
||||
mobshere.Add(atom_in_turf)
|
||||
else if(!ismob(atom_in_turf))
|
||||
reagents.touch(atom_in_turf)
|
||||
|
||||
|
||||
for (var/atom/B in T)
|
||||
if (!ismob(B))
|
||||
reagents.touch(B)
|
||||
|
||||
if (mobshere.len)
|
||||
var/portion = 1 / mobshere.len
|
||||
if(length(mobshere))
|
||||
var/portion = 1 / length(mobshere)
|
||||
var/total = reagents.total_volume
|
||||
for (var/mob/living/L in mobshere)
|
||||
reagents.splash(L, total * portion)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
for(var/mob/living/mobsphere_living_mob as anything in mobshere)
|
||||
reagents.splash(mobsphere_living_mob, total * portion)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
|
||||
@@ -853,7 +853,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
CutOverlays(blood_overlay, TRUE)
|
||||
CutOverlays(blood_overlay, ATOM_ICON_CACHE_ALL)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
|
||||
@@ -224,6 +224,9 @@
|
||||
/obj/machinery/shower/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(QDELETED(arrived))
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(src, PROC_REF(wash), arrived)
|
||||
if(ismob(arrived))
|
||||
mobpresent += 1
|
||||
@@ -232,6 +235,9 @@
|
||||
/obj/machinery/shower/proc/on_exit(atom/movable/gone, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(QDELETED(gone))
|
||||
return
|
||||
|
||||
if(ismob(gone))
|
||||
mobpresent -= 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user