Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 2, 2023
1 parent 37eed65 commit 7f2aeed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/_onclick/adjacent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ Quick adjacency (to turf):
/obj/item/Adjacent(atom/neighbor, recurse = 1)
if(neighbor == loc || (loc && neighbor == loc.loc))
return TRUE

// Internal storages have special relationships with the object they are connected to and we still want two depth adjacency for storages
if(istype(loc.loc, /obj/item/storage/internal) && recurse > 0)
return loc.loc.Adjacent(neighbor, recurse)

if(issurface(loc))
return loc.Adjacent(neighbor, recurse) //Surfaces don't count as storage depth.
else if(istype(loc, /obj/item))
Expand Down

0 comments on commit 7f2aeed

Please sign in to comment.