[MIRROR] Pathfinding circuitry and ID lockable assemblies (#11246)

Co-authored-by: Aura Dusklight <46622484+NovaDusklight@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-26 21:31:01 +02:00
committed by GitHub
co-authored by Aura Dusklight Kashargul
parent 053f149ebc
commit 2e377cdc40
3 changed files with 191 additions and 14 deletions
+13
View File
@@ -444,6 +444,19 @@
L.Add(T)
return L
// Diagonal-friendly version of CardinalTurfWithAccess
/turf/proc/AdjacentTurfsWithAccess(obj/item/card/id/ID)
var/list/L = new()
for(var/dir_to_check in GLOB.alldirs) // Cardinals first.
var/turf/T = get_step(src, dir_to_check)
if(!T || !T.Adjacent(src))
continue
if(!LinkBlockedWithAccess(src, T, ID))
L.Add(T)
return L
// Similar to above but not restricted to just GLOB.cardinal directions.
/turf/proc/TurfsWithAccess(var/obj/item/card/id/ID)