mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
## About The Pull Request Fixes this <img width="983" height="591" alt="zen_Mhqh2OqiU4" src="https://github.com/user-attachments/assets/b3275052-1b24-404b-82bc-a4c8e88bdbcf" /> This code is mildly bad, but this is the best way we can fix FLOAT_LAYER topdown emissives/blockers rendering ontop of everything else. Also added logging/unit testing for blood trails spawned outside of holders, mappers can use holders to spawn trails (which is the right way to add them to your maps) ## Changelog 🆑 fix: Fixed blood/glass floor glow going over objects /🆑
46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
/datum/unit_test/washing
|
|
/// Stuff we want to test that isn't cleanables, just to make sure they are getting cleaned when they should
|
|
var/list/cleanable_bonus_list = list(
|
|
/obj/effect/rune,
|
|
/obj/item/clothing/gloves/color/black,
|
|
/mob/living/carbon/human/dummy/consistent,
|
|
)
|
|
|
|
/// Tracks if we caught the clean signal, to know we washed successfully
|
|
VAR_PRIVATE/clean_sig_caught = 0
|
|
|
|
/datum/unit_test/washing/Run()
|
|
for(var/i in subtypesof(/obj/effect/decal/cleanable) + cleanable_bonus_list - uncreatables)
|
|
var/atom/movable/to_clean = allocate(i)
|
|
var/mopable = HAS_TRAIT(to_clean, TRAIT_MOPABLE)
|
|
|
|
clean_sig_caught = 0
|
|
RegisterSignal(to_clean, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_caught))
|
|
run_loc_floor_bottom_left.wash(CLEAN_ALL)
|
|
// mopables are cleaned when their turf is cleaned
|
|
if(mopable)
|
|
if(clean_sig_caught == 0)
|
|
TEST_FAIL("[i] was not cleaned when its turf was cleaned (cleaning only mopables)!")
|
|
if(clean_sig_caught > 1)
|
|
TEST_FAIL("[i] was cleaned more than once when its turf was cleaned (cleaning only mopables)!")
|
|
// non-mopables require the all_contents = TRUE flag to be cleaned
|
|
else
|
|
if(clean_sig_caught != 0)
|
|
TEST_FAIL("[i] was cleaned when its turf was cleaned (cleaning only mopables)!")
|
|
run_loc_floor_bottom_left.wash(CLEAN_ALL, TRUE)
|
|
if(clean_sig_caught == 0)
|
|
TEST_FAIL("[i] was not cleaned when its turf was cleaned (cleaning all contents)!")
|
|
if(clean_sig_caught > 1)
|
|
TEST_FAIL("[i] was cleaned more than once when its turf was cleaned (cleaning all contents)!")
|
|
|
|
if(!QDELETED(to_clean))
|
|
if(istype(to_clean, /obj/effect/decal/cleanable))
|
|
TEST_FAIL("[i] was not deleted when its turf was cleaned!")
|
|
qdel(to_clean)
|
|
|
|
/datum/unit_test/washing/proc/clean_caught(...)
|
|
SIGNAL_HANDLER
|
|
|
|
clean_sig_caught += 1
|
|
return COMPONENT_CLEANED
|