refactor is_blocked_turf (#29324)

This commit is contained in:
warriorstar-orion
2025-05-21 00:43:45 +00:00
committed by GitHub
parent 7faed06981
commit 45e88ffb71
33 changed files with 107 additions and 75 deletions
@@ -180,7 +180,7 @@
/obj/effect/spawner/random/proc/has_unblocked_line(destination)
for(var/turf/potential_blockage as anything in get_line(get_turf(src), destination))
if(!is_blocked_turf(potential_blockage, exclude_mobs = TRUE))
if(!potential_blockage.is_blocked_turf(exclude_mobs = TRUE))
continue
return FALSE
return TRUE
+1 -1
View File
@@ -82,7 +82,7 @@
return
var/turf/T = get_turf(target)
if(is_blocked_turf(T, TRUE)) //can't put mines on a tile that has dense stuff
if(T.is_blocked_turf(exclude_mobs = TRUE)) //can't put mines on a tile that has dense stuff
to_chat(user, "<span class='notice'>The space is occupied! You cannot place a mine there!</span>")
return
if(!use(1)) //Can't place a landmine if you don't have a landmine
@@ -28,7 +28,7 @@
to_chat(user, "<span class='notice'>You use [src] to deactivate [H].</span>")
qdel(H)
else
if(!is_blocked_turf(T, TRUE)) //can't put holograms on a tile that has dense stuff
if(!T.is_blocked_turf(exclude_mobs = TRUE)) //can't put holograms on a tile that has dense stuff
if(holocreator_busy)
to_chat(user, "<span class='notice'>[src] is busy creating a hologram.</span>")
return
@@ -42,7 +42,7 @@
holocreator_busy = FALSE
if(length(signs) >= max_signs)
return
if(is_blocked_turf(T, TRUE)) //don't try to sneak dense stuff on our tile during the wait.
if(T.is_blocked_turf(exclude_mobs = TRUE)) //don't try to sneak dense stuff on our tile during the wait.
return
H = new holosign_type(get_turf(target), src)
to_chat(user, "<span class='notice'>You create [H] with [src].</span>")
@@ -512,7 +512,7 @@
return
var/list/turfs = list()
for(var/turf/T in orange(1, get_turf(target)))
if(is_blocked_turf(T, TRUE))
if(T.is_blocked_turf(exclude_mobs = TRUE))
continue
turfs += T
+1 -1
View File
@@ -50,7 +50,7 @@
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(is_blocked_turf(T))
if(T.is_blocked_turf())
continue
L.Add(T)