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,9 +34,12 @@
return A return A
return 0 return 0
/proc/in_range(source, user) /proc/in_range(atom/source, mob/user)
if(get_dist(source, user) <= 1) if(source.Adjacent(user))
return 1 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 return 0 //not in range and not telekinetic

View File

@@ -379,14 +379,8 @@ Class Procs:
if(usr.z != 2) if(usr.z != 2)
to_chat(usr, "<span class='warning'>WARNING: Unable to interface with \the [src.name].</span>") to_chat(usr, "<span class='warning'>WARNING: Unable to interface with \the [src.name].</span>")
return 1 return 1
var/norange = 0 if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
if(usr.mutations && usr.mutations.len) return 1
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) else if(!custom_aghost_alerts)
log_adminghost("[key_name(usr)] screwed with [src] ([href])!") log_adminghost("[key_name(usr)] screwed with [src] ([href])!")