diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 752d4b784ab..15b8ca546af 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -23,11 +23,18 @@ /// Use this if your decal is one of one, and thus we should not spawn it if it's there already /// Returns either the existing cleanable, the one we created, or null if we can't spawn on that turf /turf/proc/spawn_unique_cleanable(obj/effect/decal/cleanable/cleanable_type) + var/turf/checkturf = src + while (isgroundlessturf(checkturf) && checkturf.zPassOut(DOWN)) + var/turf/below = GET_TURF_BELOW(checkturf) + if (!below || !below.zPassIn(DOWN)) + break + checkturf = below + // There is no need to spam unique cleanables, they don't stack and it just chews cpu - var/obj/effect/decal/cleanable/existing = locate(cleanable_type) in src + var/obj/effect/decal/cleanable/existing = locate(cleanable_type) in checkturf if(existing) return existing - return new cleanable_type(src) + return new cleanable_type(checkturf) /obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases) . = ..() diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index 646713a21d7..e5fce2731fb 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -15,6 +15,8 @@ var/static/list/loc_connections = list( COMSIG_TURF_CHANGE = PROC_REF(on_decal_move), ) + while(isopenspaceturf(loc) && can_z_move(DOWN, z_move_flags = ZMOVE_ALLOW_ANCHORED)) + zMove(DOWN, z_move_flags = ZMOVE_ALLOW_ANCHORED) AddElement(/datum/element/connect_loc, loc_connections) /obj/effect/decal/blob_act(obj/structure/blob/B) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index ef5dd8d0a85..404840175a5 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -3089,7 +3089,7 @@ /datum/reagent/ants/expose_turf(turf/exposed_turf, reac_volume) . = ..() - if(!istype(exposed_turf) || isspaceturf(exposed_turf)) // Is the turf valid + if(!istype(exposed_turf)) // Is the turf valid return if((reac_volume <= 10)) // Makes sure people don't duplicate ants. return