Removes most hard-coded z level checks

This commit is contained in:
Crazylemon64
2016-07-31 21:29:03 -07:00
parent f54de64a73
commit bf2bcbce67
122 changed files with 325 additions and 410 deletions
+1 -2
View File
@@ -41,8 +41,7 @@
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
// unless it's on the same level as the object it's interacting with.
var/turf/T = get_turf(src_object)
// TODO: Tie into space manager
if(!T || !(z == T.z || (T.z in config.player_levels)))
if(!T || !(atoms_share_level(src,T) || is_level_reachable(T.z)))
return STATUS_CLOSE
// If an object is in view then we can interact with it
+1 -2
View File
@@ -5,8 +5,7 @@
if(..())
return 1
var/turf/T = get_turf(nano_host())
// TODO: Tie into space manager
if(!T || !(T.z in config.player_levels))
if(!T || !is_level_reachable(T.z))
to_chat(usr, "<span class='warning'>Unable to establish a connection<span>: You're too far away from the station!")
return 0
if(href_list["track"])