Makes the station Z level into a list instead of a single define

This commit is contained in:
KorPhaeron
2017-09-11 12:39:52 -05:00
committed by CitadelStationBot
parent 8ee6fdb76a
commit d05fdb0eb0
86 changed files with 1322 additions and 110 deletions
+1 -1
View File
@@ -624,7 +624,7 @@
if(3)
var/count = 0
for(var/mob/living/carbon/monkey/Monkey in world)
if(Monkey.z == ZLEVEL_STATION)
if(Monkey.z in GLOB.station_z_levels)
count++
return "Kill all [count] of the monkeys on the station"
if(4)
+1 -1
View File
@@ -454,7 +454,7 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Egalitarian Station")
for(var/obj/machinery/door/airlock/W in GLOB.machines)
if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
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))
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')
+1 -1
View File
@@ -509,7 +509,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
for(var/area/A in world)
if(on_station)
var/turf/picked = safepick(get_area_turfs(A.type))
if(picked && (picked.z == ZLEVEL_STATION))
if(picked && (picked.z in GLOB.station_z_levels))
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))
+4 -4
View File
@@ -80,7 +80,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_CHANGELING) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
@@ -113,7 +113,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_REV in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_REV) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
@@ -155,7 +155,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_CULTIST in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_CULTIST) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
@@ -188,7 +188,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_SERVANT_OF_RATVAR in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_SERVANT_OF_RATVAR) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
+2 -1
View File
@@ -5,11 +5,12 @@
anchored = TRUE
density = TRUE
var/question = "Travel back?"
var/zlevels = list(ZLEVEL_STATION)
var/list/zlevels = list()
/obj/structure/signpost/New()
. = ..()
set_light(2)
zlevels = GLOB.station_z_levels
/obj/structure/signpost/attackby(obj/item/W, mob/user, params)
return attack_hand(user)
+1 -1
View File
@@ -40,7 +40,7 @@
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
if(QDELETED(temp_vent))
continue
if(temp_vent.loc.z == ZLEVEL_STATION && !temp_vent.welded)
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
//Stops Aliens getting stuck in small networks.
//See: Security, Virology
+1 -1
View File
@@ -27,7 +27,7 @@
/datum/round_event/brand_intelligence/start()
for(var/obj/machinery/vending/V in GLOB.machines)
if(V.z != ZLEVEL_STATION)
if(!(V.z in GLOB.station_z_levels))
continue
vendingMachines.Add(V)
if(!vendingMachines.len)
+1 -1
View File
@@ -25,7 +25,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != ZLEVEL_STATION)
if(!(T.z in GLOB.station_z_levels))
continue
if(!H.client)
continue
+1 -1
View File
@@ -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 == ZLEVEL_STATION)
if(C.cell && (C.z in GLOB.station_z_levels))
C.energy_fail(rand(30,120))
+1 -1
View File
@@ -25,7 +25,7 @@
/datum/round_event/presents/start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != ZLEVEL_STATION)
if(!(xmas.z in GLOB.station_z_levels))
continue
for(var/turf/open/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
+13
View File
@@ -21,6 +21,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
/datum/round_event/immovable_rod/start()
var/startside = pick(GLOB.cardinals)
<<<<<<< HEAD
var/turf/startT = spaceDebrisStartLoc(startside, ZLEVEL_STATION)
var/turf/endT = spaceDebrisFinishLoc(startside, ZLEVEL_STATION)
new /obj/effect/immovablerod(startT, endT)
@@ -31,6 +32,18 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
icon = 'icons/obj/objects.dmi'
icon_state = "immrod"
throwforce = 100
=======
var/turf/startT = spaceDebrisStartLoc(startside, ZLEVEL_STATION_PRIMARY)
var/turf/endT = spaceDebrisFinishLoc(startside, ZLEVEL_STATION_PRIMARY)
new /obj/effect/immovablerod(startT, endT)
/obj/effect/immovablerod
name = "immovable rod"
desc = "What the fuck is that?"
icon = 'icons/obj/objects.dmi'
icon_state = "immrod"
throwforce = 100
>>>>>>> 10a3238... Makes the station Z level into a list instead of a single define (#30297)
density = TRUE
anchored = TRUE
var/z_original = 0
+1 -1
View File
@@ -40,7 +40,7 @@
storm = storm = mutable_appearance('icons/obj/tesla_engine/energy_ball.dmi', "energy_ball_fast", FLY_LAYER)
storm.color = "#00FF00"
station_areas = get_areas_in_z(ZLEVEL_STATION)
station_areas = get_areas_in_z(ZLEVEL_STATION_PRIMARY)
number_of_bosses = 0
for(var/boss in boss_types)
+22
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/datum/round_event_control/radiation_storm
name = "Radiation Storm"
typepath = /datum/round_event/radiation_storm
@@ -18,3 +19,24 @@
/datum/round_event/radiation_storm/start()
SSweather.run_weather("radiation storm",ZLEVEL_STATION)
make_maint_all_access()
=======
/datum/round_event_control/radiation_storm
name = "Radiation Storm"
typepath = /datum/round_event/radiation_storm
max_occurrences = 1
/datum/round_event/radiation_storm
/datum/round_event/radiation_storm/setup()
startWhen = 3
endWhen = startWhen + 1
announceWhen = 1
/datum/round_event/radiation_storm/announce()
priority_announce("High levels of radiation detected near the station. Maintenance is best shielded from radiation.", "Anomaly Alert", 'sound/ai/radiation.ogg')
//sound not longer matches the text, but an audible warning is probably good
/datum/round_event/radiation_storm/start()
SSweather.run_weather("radiation storm",ZLEVEL_STATION_PRIMARY)
>>>>>>> 10a3238... Makes the station Z level into a list instead of a single define (#30297)
+1 -1
View File
@@ -31,7 +31,7 @@
var/list/potential = list()
for(var/mob/living/simple_animal/L in GLOB.living_mob_list)
var/turf/T = get_turf(L)
if(T.z != ZLEVEL_STATION)
if(!(T.z in GLOB.station_z_levels))
continue
if(!(L in GLOB.player_list) && !L.mind)
potential += L
+40
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/datum/round_event_control/spider_infestation
name = "Spider Infestation"
typepath = /datum/round_event/spider_infestation
@@ -35,3 +36,42 @@
spawn_atom_to_turf(spawn_type, vent, 1, FALSE)
vents -= vent
spawncount--
=======
/datum/round_event_control/spider_infestation
name = "Spider Infestation"
typepath = /datum/round_event/spider_infestation
weight = 5
max_occurrences = 1
min_players = 15
/datum/round_event/spider_infestation
announceWhen = 400
var/spawncount = 1
/datum/round_event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(5, 8)
/datum/round_event/spider_infestation/announce()
priority_announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", 'sound/ai/aliens.ogg')
/datum/round_event/spider_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
if(temp_vent_parent.other_atmosmch.len > 20)
vents += temp_vent
while((spawncount >= 1) && vents.len)
var/obj/vent = pick(vents)
var/spawn_type = /obj/structure/spider/spiderling
if(prob(66))
spawn_type = /obj/structure/spider/spiderling/nurse
spawn_atom_to_turf(spawn_type, vent, 1, FALSE)
vents -= vent
spawncount--
>>>>>>> 10a3238... Makes the station Z level into a list instead of a single define (#30297)
+52
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/datum/round_event_control/vent_clog
name = "Clogged Vents"
typepath = /datum/round_event/vent_clog
@@ -47,3 +48,54 @@
while(cockroaches)
new /mob/living/simple_animal/cockroach(get_turf(vent))
cockroaches--
=======
/datum/round_event_control/vent_clog
name = "Clogged Vents"
typepath = /datum/round_event/vent_clog
weight = 35
/datum/round_event/vent_clog
announceWhen = 1
startWhen = 5
endWhen = 35
var/interval = 2
var/list/vents = list()
var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","mushroomhallucinogen","lube",
"plantbgone","banana","charcoal","space_drugs","morphine","holywater","ethanol","hot_coco","sacid")
/datum/round_event/vent_clog/announce()
priority_announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
/datum/round_event/vent_clog/setup()
endWhen = rand(25, 100)
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
if(temp_vent_parent.other_atmosmch.len > 20)
vents += temp_vent
if(!vents.len)
return kill()
/datum/round_event/vent_clog/tick()
if(activeFor % interval == 0)
var/obj/machinery/atmospherics/components/unary/vent = pick_n_take(vents)
while(vent && vent.welded)
vent = pick_n_take(vents)
if(vent && vent.loc)
var/datum/reagents/R = new/datum/reagents(50)
R.my_atom = vent
R.add_reagent(pick(gunk), 50)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.set_up(R, 1, vent, silent = 1)
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)
var/cockroaches = prob(33) ? 3 : 0
while(cockroaches)
new /mob/living/simple_animal/cockroach(get_turf(vent))
cockroaches--
>>>>>>> 10a3238... Makes the station Z level into a list instead of a single define (#30297)
@@ -13,4 +13,4 @@
/datum/round_event/wizard/darkness/start()
if(!started)
started = TRUE
SSweather.run_weather("advanced darkness", ZLEVEL_STATION)
SSweather.run_weather("advanced darkness", ZLEVEL_STATION_PRIMARY)
+1 -1
View File
@@ -38,7 +38,7 @@
ruins_wizard_loadout = 1
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(ruins_spaceworthiness && (H.z != ZLEVEL_STATION || isspaceturf(H.loc) || isplasmaman(H)))
if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
continue //#savetheminers
if(ruins_wizard_loadout && H.mind && ((H.mind in SSticker.mode.wizards) || (H.mind in SSticker.mode.apprentices)))
continue
+1 -1
View File
@@ -12,4 +12,4 @@
/datum/round_event/wizard/lava/start()
if(!started)
started = TRUE
SSweather.run_weather("the floor is lava", ZLEVEL_STATION)
SSweather.run_weather("the floor is lava", ZLEVEL_STATION_PRIMARY)
+2 -2
View File
@@ -8,7 +8,7 @@
/datum/round_event_control/wizard/petsplosion/preRunEvent()
for(var/mob/living/simple_animal/F in GLOB.living_mob_list)
if(!ishostile(F) && F.z == ZLEVEL_STATION)
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
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.living_mob_list) //If you cull the heard before the next replication, things will be easier for you
if(!ishostile(F) && F.z == ZLEVEL_STATION)
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
new F.type(F.loc)
mobs_duped++
if(mobs_duped > 400)
+1 -1
View File
@@ -13,7 +13,7 @@
var/list/mobs = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(H.z != ZLEVEL_STATION)
if(!(H.z in GLOB.station_z_levels))
continue //lets not try to strand people in space or stuck in the wizards den
moblocs += H.loc
mobs += H
+1 -1
View File
@@ -21,7 +21,7 @@
/datum/round_event/wormholes/start()
for(var/turf/open/floor/T in world)
if(T.z == ZLEVEL_STATION)
if(T.z in GLOB.station_z_levels)
pick_turfs += T
for(var/i = 1, i <= number_of_wormholes, i++)
+4 -4
View File
@@ -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 == ZLEVEL_STATION ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]<br>"
var/dat = "[(z in GLOB.station_z_levels) ? "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 == ZLEVEL_STATION) //Only available if miners are lazy and did not set an LZ using the remote.
if(!destination_found && (z in GLOB.station_z_levels)) //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 != ZLEVEL_STATION && shuttleId == "colony_drop")
if(!(z in GLOB.station_z_levels && 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)
@@ -200,7 +200,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 == ZLEVEL_STATION)
if(A.z in GLOB.station_z_levels)
AB = A
break
if(!AB)
+1 -2
View File
@@ -151,8 +151,7 @@
to_chat(owner, "<span class='warning'>You can only build within the mining base!</span>")
return FALSE
if(build_target.z != ZLEVEL_STATION)
if(!(build_target.z in GLOB.station_z_levels))
to_chat(owner, "<span class='warning'>The mining base has launched and can no longer be modified.</span>")
return FALSE
@@ -41,7 +41,7 @@
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
var/turf/T = get_turf(B)
if(T.z == ZLEVEL_STATION)
if(T.z in GLOB.station_z_levels)
destinations += B
return destinations
@@ -93,7 +93,7 @@
/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M)
if(!ismob(M) && !isobj(M)) //No don't teleport lighting and effects!
return
if(M.anchored && (!ismob(M) || (istype(M, /obj/mecha) && !mech_sized)))
return
+1 -1
View File
@@ -102,7 +102,7 @@
smelt_ore(ore)
/obj/machinery/mineral/ore_redemption/proc/send_console_message()
if(z != ZLEVEL_STATION)
if(!(z in GLOB.station_z_levels))
return
message_sent = TRUE
var/area/A = get_area(src)
+1 -1
View File
@@ -69,7 +69,7 @@
var/global/list/dumb_rev_heads = list()
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user)
if(user.z == ZLEVEL_STATION && user.mind && (user.mind in SSticker.mode.head_revolutionaries) && !(user.mind in dumb_rev_heads))
if((user.z in GLOB.station_z_levels) && user.mind && (user.mind in SSticker.mode.head_revolutionaries) && !(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
+1 -1
View File
@@ -106,7 +106,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(turfs.len)
T = pick(turfs)
else
T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION) //middle of the station
T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION_PRIMARY) //middle of the station
loc = T
+1 -1
View File
@@ -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)
if(prob(20) && !stat)
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && z == ZLEVEL_STATION) //QoL mainly
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && (z in GLOB.station_z_levels)) //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>")
@@ -114,7 +114,7 @@ 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>")
if(z != ZLEVEL_STATION && !client) //NPC monsters won't heal while on station
if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
if(guidance)
adjustHealth(-L.maxHealth)
else
@@ -101,7 +101,7 @@
visible_message(
"<span class='danger'>[src] devours [L]!</span>",
"<span class='userdanger'>You feast on [L], restoring your health!</span>")
if(z != ZLEVEL_STATION && !client) //NPC monsters won't heal while on station
if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
adjustBruteLoss(-L.maxHealth/2)
L.gib()
@@ -13,7 +13,7 @@
var/has_alert = 0
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
var/alarm_z = list(ZLEVEL_STATION,ZLEVEL_LAVALAND)
var/alarm_z = list(ZLEVEL_STATION_PRIMARY,ZLEVEL_LAVALAND)
/datum/computer_file/program/alarm_monitor/process_tick()
..()
@@ -44,7 +44,7 @@
//var/valid_z_levels = (GetConnectedZlevels(T.z) & using_map.station_levels)
for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines)
// Delaminating, not within coverage, not on a tile.
if(!(S.z == ZLEVEL_STATION || S.z == ZLEVEL_MINING || S.z == T.z) || !istype(S.loc, /turf/))
if(!(S.z in GLOB.station_z_levels || S.z == ZLEVEL_MINING || S.z == T.z) || !istype(S.loc, /turf/))
continue
supermatters.Add(S)
@@ -48,7 +48,7 @@
if(holder)
var/turf/T = get_turf(holder)
if((T && istype(T)) && (T.z == ZLEVEL_STATION || T.z == ZLEVEL_MINING))
if((T && istype(T)) && ((T.z in GLOB.station_z_levels) || T.z == ZLEVEL_MINING))
// Computer is on station. Low/High signal depending on what type of network card you have
if(long_range)
return 2
+1 -1
View File
@@ -840,7 +840,7 @@
if(!malf.can_shunt)
to_chat(malf, "<span class='warning'>You cannot shunt!</span>")
return
if(src.z != ZLEVEL_STATION)
if(!(src.z in GLOB.station_z_levels))
return
occupier = new /mob/living/silicon/ai(src, malf.laws, malf) //DEAR GOD WHY? //IKR????
occupier.adjustOxyLoss(malf.getOxyLoss())
+1 -1
View File
@@ -54,7 +54,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 == ZLEVEL_STATION && !iscultist(player))
if(player.stat != DEAD && (player.loc.z in GLOB.station_z_levels) && !iscultist(player))
souls_needed[player] = TRUE
soul_goal = round(1 + LAZYLEN(souls_needed) * 0.6)
INVOKE_ASYNC(src, .proc/begin_the_end)
@@ -20,11 +20,11 @@
if(!istype(mother, /datum/mapGenerator/repair/reload_station_map))
return
var/datum/mapGenerator/repair/reload_station_map/mother1 = mother
if(mother1.z != ZLEVEL_STATION)
if(!(mother1.z in GLOB.station_z_levels))
return //This is only for reloading station blocks!
GLOB.reloading_map = TRUE
var/static/dmm_suite/reloader = new
var/list/bounds = reloader.load_map(file(SSmapping.config.GetFullMapPath()),measureOnly = FALSE, no_changeturf = FALSE,x_offset = 0, y_offset = 0, z_offset = ZLEVEL_STATION, cropMap=TRUE, lower_crop_x = mother1.x_low, lower_crop_y = mother1.y_low, upper_crop_x = mother1.x_high, upper_crop_y = mother1.y_high)
var/list/bounds = reloader.load_map(file(SSmapping.config.GetFullMapPath()),measureOnly = FALSE, no_changeturf = FALSE,x_offset = 0, y_offset = 0, z_offset = ZLEVEL_STATION_PRIMARY, cropMap=TRUE, lower_crop_x = mother1.x_low, lower_crop_y = mother1.y_low, upper_crop_x = mother1.x_high, upper_crop_y = mother1.y_high)
var/list/obj/machinery/atmospherics/atmos_machines = list()
var/list/obj/structure/cable/cables = list()
@@ -87,13 +87,13 @@
/datum/mapGenerator/repair/reload_station_map/defineRegion(turf/start, turf/end)
. = ..()
if(start.z != ZLEVEL_STATION || end.z != ZLEVEL_STATION)
if(!(start.z in GLOB.station_z_levels) || !(end.z in GLOB.station_z_levels))
return
x_low = min(start.x, end.x)
y_low = min(start.y, end.y)
x_high = max(start.x, end.x)
y_high = max(start.y, end.y)
z = ZLEVEL_STATION
z = ZLEVEL_STATION_PRIMARY
GLOBAL_VAR_INIT(reloading_map, FALSE)
@@ -1,3 +1,4 @@
<<<<<<< HEAD
GLOBAL_VAR_INIT(security_level, 0)
//0 = code green
//1 = code blue
@@ -132,3 +133,133 @@ GLOBAL_VAR_INIT(security_level, 0)
/mob/verb/set_thing3()
set_security_level(3)
*/
=======
GLOBAL_VAR_INIT(security_level, 0)
//0 = code green
//1 = code blue
//2 = code red
//3 = code delta
//config.alert_desc_blue_downto
/proc/set_security_level(level)
switch(level)
if("green")
level = SEC_LEVEL_GREEN
if("blue")
level = SEC_LEVEL_BLUE
if("red")
level = SEC_LEVEL_RED
if("delta")
level = SEC_LEVEL_DELTA
//Will not be announced if you try to set to the same level as it already is
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level)
switch(level)
if(SEC_LEVEL_GREEN)
minor_announce(config.alert_desc_green, "Attention! Security level lowered to green:")
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level >= SEC_LEVEL_RED)
SSshuttle.emergency.modTimer(4)
else
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)
FA.update_icon()
if(SEC_LEVEL_BLUE)
if(GLOB.security_level < SEC_LEVEL_BLUE)
minor_announce(config.alert_desc_blue_upto, "Attention! Security level elevated to blue:",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
SSshuttle.emergency.modTimer(0.5)
else
minor_announce(config.alert_desc_blue_downto, "Attention! Security level lowered to blue:")
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
SSshuttle.emergency.modTimer(2)
GLOB.security_level = SEC_LEVEL_BLUE
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(FA.z in GLOB.station_z_levels)
FA.update_icon()
if(SEC_LEVEL_RED)
if(GLOB.security_level < SEC_LEVEL_RED)
minor_announce(config.alert_desc_red_upto, "Attention! Code red!",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level == SEC_LEVEL_GREEN)
SSshuttle.emergency.modTimer(0.25)
else
SSshuttle.emergency.modTimer(0.5)
else
minor_announce(config.alert_desc_red_downto, "Attention! Code red!")
GLOB.security_level = SEC_LEVEL_RED
/* - At the time of commit, setting status displays didn't work properly
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
if(CC)
CC.post_status("alert", "redalert")*/
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(FA.z in GLOB.station_z_levels)
FA.update_icon()
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
pod.admin_controlled = 0
if(SEC_LEVEL_DELTA)
minor_announce(config.alert_desc_delta, "Attention! Delta security level reached!",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level == SEC_LEVEL_GREEN)
SSshuttle.emergency.modTimer(0.25)
else if(GLOB.security_level == SEC_LEVEL_BLUE)
SSshuttle.emergency.modTimer(0.5)
GLOB.security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(FA.z in GLOB.station_z_levels)
FA.update_icon()
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
pod.admin_controlled = 0
else
return
/proc/get_security_level()
switch(GLOB.security_level)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/num2seclevel(num)
switch(num)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/seclevel2num(seclevel)
switch( lowertext(seclevel) )
if("green")
return SEC_LEVEL_GREEN
if("blue")
return SEC_LEVEL_BLUE
if("red")
return SEC_LEVEL_RED
if("delta")
return SEC_LEVEL_DELTA
/*DEBUG
/mob/verb/set_thing0()
set_security_level(0)
/mob/verb/set_thing1()
set_security_level(1)
/mob/verb/set_thing2()
set_security_level(2)
/mob/verb/set_thing3()
set_security_level(3)
*/
>>>>>>> 10a3238... Makes the station Z level into a list instead of a single define (#30297)
+1 -1
View File
@@ -1,7 +1,7 @@
/obj/machinery/computer/camera_advanced/shuttle_docker
name = "navigation computer"
desc = "Used to designate a precise transit location for a spacecraft."
z_lock = ZLEVEL_STATION
z_lock = ZLEVEL_STATION_PRIMARY
jump_action = null
var/datum/action/innate/shuttledocker_rotate/rotate_action = new
var/datum/action/innate/shuttledocker_place/place_action = new
+2 -2
View File
@@ -410,7 +410,7 @@
mode = SHUTTLE_RECALL
/obj/docking_port/mobile/proc/enterTransit()
if(SSshuttle.lockdown && z == ZLEVEL_STATION) //emp went off, no escape
if(SSshuttle.lockdown && (z in GLOB.station_z_levels)) //emp went off, no escape
return
previous = null
// if(!destination)
@@ -574,7 +574,7 @@
if(move_mode & MOVE_AREA)
areas_to_move[old_area] = TRUE
old_turfs[place] = move_mode
/*******************************************All onShuttleMove procs******************************************/
+1 -1
View File
@@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
SSshuttle.supply = src
/obj/docking_port/mobile/supply/canMove()
if(z == ZLEVEL_STATION)
if(z in GLOB.station_z_levels)
return check_blacklist(shuttle_areas)
return ..()
+1 -1
View File
@@ -47,7 +47,7 @@
desc = "Used to designate a precise transit location for the syndicate shuttle."
icon_screen = "syndishuttle"
icon_keyboard = "syndie_key"
z_lock = ZLEVEL_STATION
z_lock = ZLEVEL_STATION_PRIMARY
shuttleId = "syndicate"
shuttlePortId = "syndicate_custom"
shuttlePortName = "custom location"
+1 -1
View File
@@ -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 != ZLEVEL_STATION)
if(!A.active || !(A.z in GLOB.station_z_levels))
continue
coverage |= view(A.kill_range,A)
return coverage.len