Replace explicit z-level checks with defines
This commit is contained in:
committed by
CitadelStationBot
parent
48e0c47410
commit
0418ee4df6
@@ -40,8 +40,13 @@
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
if(QDELETED(temp_vent))
|
||||
continue
|
||||
<<<<<<< HEAD
|
||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
||||
=======
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
//Stops Aliens getting stuck in small networks.
|
||||
//See: Security, Virology
|
||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/datum/round_event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in GLOB.machines)
|
||||
if(!(V.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(V.z))
|
||||
continue
|
||||
vendingMachines.Add(V)
|
||||
if(!vendingMachines.len)
|
||||
|
||||
@@ -33,7 +33,11 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
<<<<<<< HEAD
|
||||
if(T.z != ZLEVEL_STATION_PRIMARY)
|
||||
=======
|
||||
if(!is_station_level(T.z))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
continue
|
||||
if(!H.client)
|
||||
continue
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
/datum/round_event/grid_check/start()
|
||||
for(var/P in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/C = P
|
||||
if(C.cell && (C.z in GLOB.station_z_levels))
|
||||
if(C.cell && is_station_level(C.z))
|
||||
C.energy_fail(rand(30,120))
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
/obj/machinery/shuttle_scrambler/process()
|
||||
if(active)
|
||||
if(z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
var/siphoned = min(SSshuttle.points,siphon_per_tick)
|
||||
SSshuttle.points -= siphoned
|
||||
credits_stored += siphoned
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
/obj/docking_port/mobile/pirate/initiate_docking(obj/docking_port/stationary/new_dock, movement_direction, force=FALSE)
|
||||
. = ..()
|
||||
if(. == DOCKING_SUCCESS && new_dock.z != ZLEVEL_TRANSIT)
|
||||
if(. == DOCKING_SUCCESS && !is_transit_level(new_dock.z))
|
||||
engines_cooling = TRUE
|
||||
addtimer(CALLBACK(src,.proc/reset_cooldown),engine_cooldown,TIMER_UNIQUE)
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
var/list/results = list()
|
||||
for(var/atom/movable/AM in world)
|
||||
if(is_type_in_typecache(AM,GLOB.pirate_loot_cache))
|
||||
if(AM.z in GLOB.station_z_levels)
|
||||
if(is_station_level(AM.z))
|
||||
if(get_area(AM) == get_area(src)) //Should this be variable ?
|
||||
continue
|
||||
results += AM
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/list/potential = list()
|
||||
for(var/mob/living/simple_animal/L in GLOB.alive_mob_list)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!(T.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(T.z))
|
||||
continue
|
||||
if(!(L in GLOB.player_list) && !L.mind)
|
||||
potential += L
|
||||
|
||||
@@ -22,8 +22,13 @@
|
||||
/datum/round_event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in world)
|
||||
<<<<<<< HEAD
|
||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
||||
=======
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -19,8 +19,13 @@
|
||||
/datum/round_event/vent_clog/setup()
|
||||
endWhen = rand(25, 100)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
||||
<<<<<<< HEAD
|
||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
||||
=======
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||
vents += temp_vent
|
||||
if(!vents.len)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
ruins_wizard_loadout = 1
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
|
||||
if(ruins_spaceworthiness && !is_station_level(H.z) || isspaceturf(H.loc) || isplasmaman(H))
|
||||
continue //#savetheminers
|
||||
if(ruins_wizard_loadout && iswizard(H))
|
||||
continue
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/greentext/process()
|
||||
if(new_holder && new_holder.z == ZLEVEL_CENTCOM)//you're winner!
|
||||
if(new_holder && is_centcom_level(new_holder.z))//you're winner!
|
||||
to_chat(new_holder, "<font color='green'>At last it feels like victory is assured!</font>")
|
||||
if(!(new_holder in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += new_holder.mind
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/datum/round_event_control/wizard/petsplosion/preRunEvent()
|
||||
for(var/mob/living/simple_animal/F in GLOB.alive_mob_list)
|
||||
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
|
||||
if(!ishostile(F) && is_station_level(F.z))
|
||||
mobs_to_dupe++
|
||||
if(mobs_to_dupe > 100 || !mobs_to_dupe)
|
||||
return EVENT_CANT_RUN
|
||||
@@ -24,7 +24,7 @@
|
||||
if(activeFor >= 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals
|
||||
countdown += 1
|
||||
for(var/mob/living/simple_animal/F in GLOB.alive_mob_list) //If you cull the heard before the next replication, things will be easier for you
|
||||
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
|
||||
if(!ishostile(F) && is_station_level(F.z))
|
||||
new F.type(F.loc)
|
||||
mobs_duped++
|
||||
if(mobs_duped > 400)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/list/mobs = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(!(H.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(H.z))
|
||||
continue //lets not try to strand people in space or stuck in the wizards den
|
||||
moblocs += H.loc
|
||||
mobs += H
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/datum/round_event/wormholes/start()
|
||||
for(var/turf/open/floor/T in world)
|
||||
if(T.z in GLOB.station_z_levels)
|
||||
if(is_station_level(T.z))
|
||||
pick_turfs += T
|
||||
|
||||
for(var/i = 1, i <= number_of_wormholes, i++)
|
||||
|
||||
Reference in New Issue
Block a user