Merge pull request #7266 from clusterfack/inrange

Modifies in_range
This commit is contained in:
clusterfack
2015-12-25 11:56:49 -06:00
2 changed files with 35 additions and 38 deletions

View File

@@ -34,8 +34,11 @@
return A
return 0
/proc/in_range(source, user)
if(get_dist(source, user) <= 1)
/proc/in_range(atom/source, mob/user)
if(source.Adjacent(user))
return 1
else if(istype(user) && user.mutations && user.mutations.len)
if((M_TK in user.mutations) && (get_dist(user,source) < tk_maxrange))
return 1
return 0 //not in range and not telekinetic

View File

@@ -379,12 +379,6 @@ Class Procs:
if(usr.z != 2)
to_chat(usr, "<span class='warning'>WARNING: Unable to interface with \the [src.name].</span>")
return 1
var/norange = 0
if(usr.mutations && usr.mutations.len)
if(M_TK in usr.mutations)
norange = 1
if(!norange)
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
return 1
else if(!custom_aghost_alerts)