Replace explicit z-level checks with defines
This commit is contained in:
committed by
CitadelStationBot
parent
48e0c47410
commit
0418ee4df6
@@ -606,7 +606,7 @@
|
||||
/datum/admins/proc/unprison(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Unprison"
|
||||
if (M.z == ZLEVEL_CENTCOM)
|
||||
if (is_centcom_level(M.z))
|
||||
SSjob.SendToLateJoin(M)
|
||||
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
|
||||
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
if(isdrone(M))
|
||||
drones++
|
||||
continue
|
||||
if(M.z == ZLEVEL_CENTCOM)
|
||||
if(is_centcom_level(M.z))
|
||||
living_skipped++
|
||||
continue
|
||||
living_players++
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Egalitarian Station")
|
||||
for(var/obj/machinery/door/airlock/W in GLOB.machines)
|
||||
if((W.z in GLOB.station_z_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
if(is_station_level(W.z) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg')
|
||||
|
||||
@@ -521,7 +521,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
for(var/area/A in world)
|
||||
if(on_station)
|
||||
var/turf/picked = safepick(get_area_turfs(A.type))
|
||||
if(picked && (picked.z in GLOB.station_z_levels))
|
||||
if(picked && is_station_level(picked.z))
|
||||
if(!(A.type in areas_all) && !is_type_in_typecache(A, station_areas_blacklist))
|
||||
areas_all.Add(A.type)
|
||||
else if(!(A.type in areas_all))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return FALSE
|
||||
if(onstation)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(!(T.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(T.z))
|
||||
return FALSE
|
||||
if(conscious && applicant.stat) //incase you don't care about a certain antag being unconcious when made, ie if they have selfhealing abilities.
|
||||
return FALSE
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/obj/item/clothing/glasses/meson/engine/process()
|
||||
if(mode == MODE_MESON)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && T.z == ZLEVEL_MINING)
|
||||
if(T && is_mining_level(T.z))
|
||||
toggle_mode(loc)
|
||||
return
|
||||
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -63,7 +63,6 @@ GLOBAL_LIST_EMPTY(z_is_planet)
|
||||
/obj/effect/mapping_helpers/planet_z/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!turf_z_is_planet(T))
|
||||
GLOB.z_is_planet["[T.z]"] = list()
|
||||
GLOB.z_is_planet["[T.z]"] = TRUE
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
|
||||
var/list/options = params2list(possible_destinations)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
var/dat = "[(z in GLOB.station_z_levels) ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]<br>"
|
||||
var/dat = "[is_station_level(z) ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]<br>"
|
||||
if(M)
|
||||
var/destination_found
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
@@ -47,7 +47,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=[REF(src)];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
if(!destination_found && (z in GLOB.station_z_levels)) //Only available if miners are lazy and did not set an LZ using the remote.
|
||||
if(!destination_found && is_station_level(z)) //Only available if miners are lazy and did not set an LZ using the remote.
|
||||
dat += "<A href='?src=[REF(src)];random=1'>Prepare for blind drop? (Dangerous)</A><br>"
|
||||
if(LAZYLEN(turrets))
|
||||
dat += "<br><b>Perimeter Defense System:</b> <A href='?src=[REF(src)];turrets_power=on'>Enable All</A> / <A href='?src=[REF(src)];turrets_power=off'>Disable All</A><br> \
|
||||
@@ -86,7 +86,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
return
|
||||
|
||||
if(href_list["move"])
|
||||
if(!(z in GLOB.station_z_levels) && shuttleId == "colony_drop")
|
||||
if(!is_station_level(z) && shuttleId == "colony_drop")
|
||||
to_chat(usr, "<span class='warning'>You can't move the base again!</span>")
|
||||
return
|
||||
var/shuttle_error = SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)
|
||||
@@ -128,7 +128,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/auxillary_base/proc/set_mining_mode()
|
||||
if(z == ZLEVEL_MINING) //The console switches to controlling the mining shuttle once landed.
|
||||
if(is_mining_level(z)) //The console switches to controlling the mining shuttle once landed.
|
||||
req_one_access = list()
|
||||
shuttleId = "mining" //The base can only be dropped once, so this gives the console a new purpose.
|
||||
possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public"
|
||||
@@ -140,7 +140,17 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
to_chat(user, "<span class='warning'>This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.</span>")
|
||||
return
|
||||
if(!no_restrictions)
|
||||
<<<<<<< HEAD
|
||||
if(T.z != ZLEVEL_MINING)
|
||||
=======
|
||||
var/static/list/disallowed_turf_types = typecacheof(list(
|
||||
/turf/open/lava,
|
||||
/turf/closed/indestructible,
|
||||
/turf/open/indestructible,
|
||||
))
|
||||
|
||||
if(!is_mining_level(T.z))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
return BAD_ZLEVEL
|
||||
var/colony_radius = max(base_dock.width, base_dock.height)*0.5
|
||||
if(T.x - colony_radius < 1 || T.x + colony_radius >= world.maxx || T.y - colony_radius < 1 || T.y + colony_radius >= world.maxx)
|
||||
@@ -200,7 +210,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
var/obj/machinery/computer/auxillary_base/AB
|
||||
|
||||
for (var/obj/machinery/computer/auxillary_base/A in GLOB.machines)
|
||||
if(A.z in GLOB.station_z_levels)
|
||||
if(is_station_level(A.z))
|
||||
AB = A
|
||||
break
|
||||
if(!AB)
|
||||
@@ -267,7 +277,7 @@ obj/docking_port/stationary/public_mining_dock
|
||||
|
||||
var/turf/landing_spot = get_turf(src)
|
||||
|
||||
if(landing_spot.z != ZLEVEL_MINING)
|
||||
if(!is_mining_level(landing_spot.z))
|
||||
to_chat(user, "<span class='warning'>This device is only to be used in a mining zone.</span>")
|
||||
return
|
||||
var/obj/machinery/computer/auxillary_base/aux_base_console
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
to_chat(owner, "<span class='warning'>You can only build within the mining base!</span>")
|
||||
return FALSE
|
||||
|
||||
if(!(build_target.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(build_target.z))
|
||||
to_chat(owner, "<span class='warning'>The mining base has launched and can no longer be modified.</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
var/turf/T = deploy_location
|
||||
if(T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)//only report capsules away from the mining/lavaland level
|
||||
if(!is_mining_level(T.z)) //only report capsules away from the mining/lavaland level
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] activated a bluespace capsule away from the mining level! [ADMIN_JMP(T)]")
|
||||
log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [get_area(T)][COORD(T)]")
|
||||
template.load(deploy_location, centered = TRUE)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/turf_check(mob/user)
|
||||
var/turf/device_turf = get_turf(user)
|
||||
if(!device_turf || device_turf.z == ZLEVEL_CENTCOM || device_turf.z == ZLEVEL_TRANSIT)
|
||||
if(!device_turf || is_centcom_level(device_turf.z) || is_transit_level(device_turf.z))
|
||||
to_chat(user, "<span class='notice'>You're having difficulties getting the [src.name] to work.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
|
||||
var/turf/T = get_turf(B)
|
||||
if(T.z in GLOB.station_z_levels)
|
||||
if(is_station_level(T.z))
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
@@ -586,7 +586,7 @@
|
||||
to_chat(user, "<span class='notice'>You unfold the ladder. It extends much farther than you were expecting.</span>")
|
||||
var/last_ladder = null
|
||||
for(var/i in 1 to world.maxz)
|
||||
if(i == ZLEVEL_CENTCOM || i == ZLEVEL_TRANSIT || i == ZLEVEL_CITYOFCOGS)
|
||||
if(is_centcom_level(i) || is_transit_level(i) || is_reebe(i))
|
||||
continue
|
||||
var/turf/T2 = locate(ladder_x, ladder_y, i)
|
||||
last_ladder = new /obj/structure/ladder/unbreakable/jacob(T2, null, last_ladder)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
smelt_ore(ore)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/send_console_message()
|
||||
if(!(z in GLOB.station_z_levels))
|
||||
if(!is_station_level(z))
|
||||
return
|
||||
message_sent = TRUE
|
||||
var/area/A = get_area(src)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
req_access = list(ACCESS_MINING) // should slow the ashwalkers down.
|
||||
|
||||
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user)
|
||||
if((user.z in GLOB.station_z_levels) && user.mind && is_head_revolutionary(user) && !(user.mind in dumb_rev_heads))
|
||||
if(is_station_level(user.z) && user.mind && is_head_revolutionary(user) && !(user.mind in dumb_rev_heads))
|
||||
to_chat(user, "<span class='warning'>You get a feeling that leaving the station might be a REALLY dumb idea...</span>")
|
||||
dumb_rev_heads += user.mind
|
||||
return
|
||||
|
||||
@@ -422,7 +422,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
if(drunkenness >= 91)
|
||||
adjustBrainLoss(0.4, 60)
|
||||
if(prob(20) && !stat)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && (z in GLOB.station_z_levels)) //QoL mainly
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && is_station_level(z)) //QoL mainly
|
||||
to_chat(src, "<span class='warning'>You're so tired... but you can't miss that shuttle...</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Just a quick nap...</span>")
|
||||
|
||||
@@ -774,9 +774,9 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
if(T.z == ZLEVEL_CENTCOM) //dont detect mobs on centcom
|
||||
if(is_centcom_level(T.z)) //dont detect mobs on centcom
|
||||
return 0
|
||||
if(T.z >= ZLEVEL_SPACEMAX)
|
||||
if(is_away_level(T.z))
|
||||
return 0
|
||||
if(user != null && src == user)
|
||||
return 0
|
||||
|
||||
@@ -479,6 +479,25 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega
|
||||
|
||||
/mob/living/simple_animal/hostile/consider_wakeup()
|
||||
..()
|
||||
<<<<<<< HEAD
|
||||
if(AIStatus == AI_IDLE && FindTarget(ListTargets(), 1))
|
||||
=======
|
||||
var/list/tlist
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if (!T)
|
||||
return
|
||||
|
||||
if (!length(SSmobs.clients_by_zlevel[T.z])) // It's fine to use .len here but doesn't compile on 511
|
||||
toggle_ai(AI_Z_OFF)
|
||||
return
|
||||
|
||||
if (isturf(T) && !is_station_level(T.z))
|
||||
tlist = ListTargetsLazy(T.z)
|
||||
else
|
||||
tlist = ListTargets()
|
||||
|
||||
if(AIStatus == AI_IDLE && FindTarget(tlist, 1))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
toggle_ai(AI_ON)
|
||||
|
||||
|
||||
@@ -114,7 +114,11 @@ Difficulty: Medium
|
||||
if(L.stat == DEAD)
|
||||
visible_message("<span class='danger'>[src] butchers [L]!</span>",
|
||||
"<span class='userdanger'>You butcher [L], restoring your health!</span>")
|
||||
<<<<<<< HEAD
|
||||
if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
|
||||
=======
|
||||
if(!is_station_level(z) || client) //NPC monsters won't heal while on station
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(guidance)
|
||||
adjustHealth(-L.maxHealth)
|
||||
else
|
||||
@@ -163,7 +167,7 @@ Difficulty: Medium
|
||||
// do not take my touching of it to be endorsement of it. ~mso
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/quick_attack_loop()
|
||||
while(!QDELETED(target) && next_move <= world.time) //this is done this way because next_move can change to be sooner while we sleep.
|
||||
stoplag(1)
|
||||
stoplag(1)
|
||||
sleep((next_move - world.time) * 1.5) //but don't ask me what the fuck this is about
|
||||
if(QDELETED(target))
|
||||
return
|
||||
|
||||
@@ -105,7 +105,11 @@
|
||||
visible_message(
|
||||
"<span class='danger'>[src] devours [L]!</span>",
|
||||
"<span class='userdanger'>You feast on [L], restoring your health!</span>")
|
||||
<<<<<<< HEAD
|
||||
if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
|
||||
=======
|
||||
if(!is_station_level(z) || client) //NPC monsters won't heal while on station
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
adjustBruteLoss(-L.maxHealth/2)
|
||||
L.gib()
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
var/has_alert = 0
|
||||
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
|
||||
var/alarm_z = list(ZLEVEL_STATION_PRIMARY,ZLEVEL_LAVALAND)
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/process_tick()
|
||||
..()
|
||||
@@ -41,7 +40,7 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
if(!(source.z in alarm_z))
|
||||
if(!is_station_level(source.z) && !is_mining_level(source.z))
|
||||
return
|
||||
|
||||
var/list/L = alarms[class]
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if(!((S.z in GLOB.station_z_levels) || S.z == ZLEVEL_MINING || S.z == T.z || !isturf(S.loc)))
|
||||
if (!isturf(S.loc) || !(is_station_level(S.z) || is_mining_level(S.z) || S.z == T.z))
|
||||
continue
|
||||
supermatters.Add(S)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(holder)
|
||||
|
||||
var/turf/T = get_turf(holder)
|
||||
if((T && istype(T)) && ((T.z in GLOB.station_z_levels) || T.z == ZLEVEL_MINING))
|
||||
if((T && istype(T)) && (is_station_level(T.z) || is_mining_level(T.z)))
|
||||
// Computer is on station. Low/High signal depending on what type of network card you have
|
||||
if(long_range)
|
||||
return 2
|
||||
|
||||
@@ -941,7 +941,7 @@
|
||||
if(!malf.can_shunt)
|
||||
to_chat(malf, "<span class='warning'>You cannot shunt!</span>")
|
||||
return
|
||||
if(!(src.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(z))
|
||||
return
|
||||
occupier = new /mob/living/silicon/ai(src, malf.laws, malf) //DEAR GOD WHY? //IKR????
|
||||
occupier.adjustOxyLoss(malf.getOxyLoss())
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
var/mob/living/L = cult_mind.current
|
||||
L.narsie_act()
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(player.stat != DEAD && (player.loc.z in GLOB.station_z_levels) && !iscultist(player))
|
||||
if(player.stat != DEAD && is_station_level(player.loc.z) && !iscultist(player))
|
||||
souls_needed[player] = TRUE
|
||||
soul_goal = round(1 + LAZYLEN(souls_needed) * 0.6)
|
||||
INVOKE_ASYNC(src, .proc/begin_the_end)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/mapGenerator/lavaland
|
||||
var/start_z = 5
|
||||
var/start_z = ZLEVEL_LAVALAND
|
||||
var/min_x = 0
|
||||
var/min_y = 0
|
||||
var/max_x = 0
|
||||
@@ -18,7 +18,7 @@
|
||||
/datum/mapGeneratorModule/river
|
||||
var/river_type = /turf/open/lava/smooth
|
||||
var/river_nodes = 4
|
||||
var/start_z = 5
|
||||
var/start_z = ZLEVEL_LAVALAND
|
||||
|
||||
/datum/mapGeneratorModule/river/generate()
|
||||
var/datum/mapGenerator/lavaland/L = mother
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(!istype(mother, /datum/mapGenerator/repair/reload_station_map))
|
||||
return
|
||||
var/datum/mapGenerator/repair/reload_station_map/mother1 = mother
|
||||
if(!(mother1.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(mother1.z))
|
||||
return //This is only for reloading station blocks!
|
||||
GLOB.reloading_map = TRUE
|
||||
var/static/dmm_suite/reloader = new
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/datum/mapGenerator/repair/reload_station_map/defineRegion(turf/start, turf/end)
|
||||
. = ..()
|
||||
if(!(start.z in GLOB.station_z_levels) || !(end.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(start.z) || !is_station_level(end.z))
|
||||
return
|
||||
x_low = min(start.x, end.x)
|
||||
y_low = min(start.y, end.y)
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
|
||||
/obj/item/relic/proc/do_the_teleport(mob/user)
|
||||
var/turf/userturf = get_turf(user)
|
||||
if(loc == user && userturf.z != ZLEVEL_CENTCOM) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you!
|
||||
if(loc == user && !is_centcom_level(userturf.z)) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you!
|
||||
visible_message("<span class='notice'>[src] twists and bends, relocating itself!</span>")
|
||||
throwSmoke(userturf)
|
||||
do_teleport(user, userturf, 8, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
@@ -29,7 +29,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
SSshuttle.emergency.modTimer(2)
|
||||
GLOB.security_level = SEC_LEVEL_GREEN
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(GLOB.security_level < SEC_LEVEL_BLUE)
|
||||
@@ -43,7 +43,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
GLOB.security_level = SEC_LEVEL_BLUE
|
||||
sound_to_playing_players('sound/misc/voybluealert.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
if(SEC_LEVEL_RED)
|
||||
if(GLOB.security_level < SEC_LEVEL_RED)
|
||||
@@ -58,7 +58,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
GLOB.security_level = SEC_LEVEL_RED
|
||||
sound_to_playing_players('sound/misc/voyalert.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
|
||||
pod.admin_controlled = 0
|
||||
@@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
GLOB.security_level = SEC_LEVEL_DELTA
|
||||
sound_to_playing_players('sound/misc/deltakalaxon.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
|
||||
pod.admin_controlled = 0
|
||||
|
||||
@@ -187,7 +187,7 @@ All ShuttleMove procs go here
|
||||
|
||||
/obj/machinery/computer/auxillary_base/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation)
|
||||
. = ..()
|
||||
if(z == ZLEVEL_MINING) //Avoids double logging and landing on other Z-levels due to badminnery
|
||||
if(is_mining_level(z)) //Avoids double logging and landing on other Z-levels due to badminnery
|
||||
SSblackbox.record_feedback("associative", "colonies_dropped", 1, list("x" = x, "y" = y, "z" = z))
|
||||
|
||||
/obj/machinery/gravity_generator/main/beforeShuttleMove(turf/newT, rotation, move_mode)
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
/obj/docking_port/mobile/proc/enterTransit()
|
||||
if((SSshuttle.lockdown && (z in GLOB.station_z_levels)) || !canMove()) //emp went off, no escape
|
||||
if((SSshuttle.lockdown && is_station_level(z)) || !canMove()) //emp went off, no escape
|
||||
mode = SHUTTLE_IDLE
|
||||
return
|
||||
previous = null
|
||||
|
||||
@@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
|
||||
SSshuttle.supply = src
|
||||
|
||||
/obj/docking_port/mobile/supply/canMove()
|
||||
if(z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
return check_blacklist(shuttle_areas)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
if(z != ZLEVEL_CENTCOM)
|
||||
if(!is_centcom_level(z))
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -163,7 +163,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if(T.z == ZLEVEL_CENTCOM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
if(is_centcom_level(T.z) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
to_chat(user, "<span class='notice'>You can't cast this spell here.</span>")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/datum/station_goal/proc/get_coverage()
|
||||
var/list/coverage = list()
|
||||
for(var/obj/machinery/satellite/meteor_shield/A in GLOB.machines)
|
||||
if(!A.active || !(A.z in GLOB.station_z_levels))
|
||||
if(!A.active || !is_station_level(A.z))
|
||||
continue
|
||||
coverage |= view(A.kill_range,A)
|
||||
return coverage.len
|
||||
|
||||
Reference in New Issue
Block a user