mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
refactor is_blocked_turf (#29324)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user