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
+2 -4
View File
@@ -528,8 +528,7 @@
/obj/item/device/wormhole_jaunter/attack_self(mob/user as mob)
var/turf/device_turf = get_turf(user)
// TODO: Tie into space manager
if(!device_turf||device_turf.z==ZLEVEL_CENTCOMM||device_turf.z>=ZLEVEL_EMPTY)
if(!device_turf||is_teleport_allowed(device_turf.z))
to_chat(user, "<span class='notice'>You're having difficulties getting the [src.name] to work.</span>")
return
else
@@ -537,8 +536,7 @@
var/list/L = list()
for(var/obj/item/device/radio/beacon/B in world)
var/turf/T = get_turf(B)
// TODO: Tie into space manager
if(T.z == ZLEVEL_STATION)
if(is_station_level(T.z))
L += B
if(!L.len)
to_chat(user, "<span class='notice'>The [src.name] failed to create a wormhole.</span>")
+1 -2
View File
@@ -240,8 +240,7 @@
/obj/item/weapon/ore/New()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
// TODO: Tie into space manager
if(src.z == ZLEVEL_ASTEROID)
if(is_mining_level(src.z))
score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
/obj/item/weapon/ore/ex_act()