mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 00:35:45 +01:00
[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:
co-authored by
Aura Dusklight
Kashargul
parent
053f149ebc
commit
2e377cdc40
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user