This commit is contained in:
Molti
2024-06-02 04:33:12 -05:00
committed by GitHub
parent ee8cfc4b68
commit 2e9bf6e24d
3 changed files with 18 additions and 6 deletions

View File

@@ -173,8 +173,12 @@
continue continue
if(extended_safety_checks) if(extended_safety_checks)
var/datum/component/lingering/safety_check = F.GetComponent(/datum/component/lingering) var/list/components = F.GetComponents(/datum/component/lingering)
if(safety_check && !safety_check.is_safe()) //chasms aren't /floor, and so are pre-filtered var/safe = TRUE
for(var/datum/component/lingering/safety_check as anything in components)
if(safety_check)
safe = (safe && safety_check.is_safe())
if(!safe)
continue continue
// Check that we're not warping onto a table or window // Check that we're not warping onto a table or window

View File

@@ -141,8 +141,12 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
/mob/living/simple_animal/hostile/swarmer/ai/Move(atom/newloc) /mob/living/simple_animal/hostile/swarmer/ai/Move(atom/newloc)
if(newloc) if(newloc)
if(newloc.z == z) //so these actions are Z-specific if(newloc.z == z) //so these actions are Z-specific
var/datum/component/lingering/safety_check = newloc.GetComponent(/datum/component/lingering) var/list/components = src.GetComponents(/datum/component/lingering)
if(safety_check && !safety_check.is_safe()) var/safe = TRUE
for(var/datum/component/lingering/safety_check as anything in components)
if(safety_check)
safe = (safe && safety_check.is_safe())
if(!safe)
StartAction(20) StartAction(20)
new /obj/structure/lattice/catwalk/swarmer_catwalk(newloc) new /obj/structure/lattice/catwalk/swarmer_catwalk(newloc)
return FALSE return FALSE

View File

@@ -64,8 +64,12 @@
return FALSE return FALSE
/turf/open/lava/swarmer_act() /turf/open/lava/swarmer_act()
var/datum/component/lingering/safety_check = src.GetComponent(/datum/component/lingering) var/list/components = src.GetComponents(/datum/component/lingering)
if(safety_check && !safety_check.is_safe()) //chasms aren't /floor, and so are pre-filtered var/safe = TRUE
for(var/datum/component/lingering/safety_check as anything in components)
if(safety_check)
safe = (safe && safety_check.is_safe())
if(!safe)
new /obj/structure/lattice/catwalk/swarmer_catwalk(src) new /obj/structure/lattice/catwalk/swarmer_catwalk(src)
return FALSE return FALSE