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
View File
@@ -6,7 +6,6 @@
height = 7
/obj/docking_port/mobile/assault_pod/request()
// TODO: Tie into space manager
if(z == initial(src.z)) //No launching pods that have already launched
return ..()
+1 -2
View File
@@ -202,8 +202,7 @@
if(time_left <= 0 && !shuttle_master.emergencyNoEscape)
//move each escape pod to its corresponding transit dock
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
// TODO: Tie into space manager
if(M.z == ZLEVEL_STATION) //Will not launch from the mine/planet
if(is_station_level(M.z)) //Will not launch from the mine/planet
M.enterTransit()
//now move the actual emergency shuttle to its transit dock
for(var/area/shuttle/escape/E in world)
+3 -3
View File
@@ -28,7 +28,7 @@
return 1
/obj/docking_port/mobile/supply/canMove()
if(z == ZLEVEL_STATION)
if(is_station_level(z))
return forbidden_atoms_check(areaInstance)
return ..()
@@ -45,7 +45,7 @@
sell()
/obj/docking_port/mobile/supply/proc/buy()
if(z != ZLEVEL_STATION) //we only buy when we are -at- the station
if(!is_station_level(z)) //we only buy when we are -at- the station
return 1
if(!shuttle_master.shoppinglist.len)
@@ -93,7 +93,7 @@
shuttle_master.shoppinglist.Cut()
/obj/docking_port/mobile/supply/proc/sell()
if(z != ZLEVEL_CENTCOMM) //we only sell when we are -at- centcomm
if(z != level_name_to_num(CENTCOMM)) //we only sell when we are -at- centcomm
return 1
var/plasma_count = 0
+2 -2
View File
@@ -30,9 +30,9 @@
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
if(href_list["move"])
if(z != ZLEVEL_CENTCOMM)
if(z != level_name_to_num(CENTCOMM))
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
return 0
..()
#undef SYNDICATE_CHALLENGE_TIMER
#undef SYNDICATE_CHALLENGE_TIMER