mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge branch 'master' of github.com:Baystation12/Baystation12 into dev
This commit is contained in:
@@ -55,6 +55,21 @@
|
||||
return 1 // we don't care about our own density
|
||||
return 0
|
||||
|
||||
/*
|
||||
Quick adjacency (to turf):
|
||||
* If you are in the same turf, always true
|
||||
* If you are not adjacent, then false
|
||||
*/
|
||||
/turf/proc/AdjacentQuick(var/atom/neighbor, var/atom/target = null)
|
||||
var/turf/T0 = get_turf(neighbor)
|
||||
if(T0 == src)
|
||||
return 1
|
||||
|
||||
if(get_dist(src,T0) > 1)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/*
|
||||
Adjacency (to anything else):
|
||||
* Must be on a turf
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
/atom/proc/AltClick(var/mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && T.Adjacent(user))
|
||||
if(T && T.AdjacentQuick(user))
|
||||
if(user.listed_turf == T)
|
||||
user.listed_turf = null
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user