next set of globals (#19131)

This commit is contained in:
Kashargul
2026-02-09 00:36:52 +01:00
committed by GitHub
parent bc0df9f988
commit fa113ea3f5
101 changed files with 473 additions and 534 deletions
+3 -3
View File
@@ -109,13 +109,13 @@ GLOBAL_LIST_EMPTY(areas_by_type)
/area/proc/atmosalert(danger_level, var/alarm_source)
if (danger_level == 0)
atmosphere_alarm.clearAlarm(src, alarm_source)
GLOB.atmosphere_alarm.clearAlarm(src, alarm_source)
else
var/obj/machinery/alarm/atmosalarm = alarm_source //maybe other things can trigger these, who knows
if(istype(atmosalarm))
atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level, hidden = atmosalarm.alarms_hidden)
GLOB.atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level, hidden = atmosalarm.alarms_hidden)
else
atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level)
GLOB.atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level)
//Check all the alarms before lowering atmosalm. Raising is perfectly fine.
var/obj/machinery/alarm/AM = main_air_alarm?.resolve()
+3 -3
View File
@@ -53,9 +53,9 @@ GLOBAL_VAR_INIT(narsie_cometh, 0)
GLOB.narsie_cometh = 1
spawn(10 SECONDS)
if(emergency_shuttle)
emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall
if(GLOB.emergency_shuttle)
GLOB.emergency_shuttle.call_evac()
GLOB.emergency_shuttle.launch_time = 0 // Cannot recall
/obj/singularity/narsie/process()
eat()
+3 -3
View File
@@ -203,9 +203,9 @@ GLOBAL_LIST_EMPTY(sacrificed)
GLOB.narsie_cometh = 1
spawn(10 SECONDS)
if(emergency_shuttle)
emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall
if(GLOB.emergency_shuttle)
GLOB.emergency_shuttle.call_evac()
GLOB.emergency_shuttle.launch_time = 0 // Cannot recall
log_and_message_admins_many(cultists, "summoned the end of days.")
return
@@ -44,9 +44,9 @@ GLOBAL_VAR_INIT(universe_has_ended, 0)
for(var/mob/M in GLOB.player_list)
M.flash_eyes()
if(emergency_shuttle.can_recall())
if(GLOB.emergency_shuttle.can_recall())
priority_announcement.Announce("The emergency shuttle has returned due to bluespace distortion.")
emergency_shuttle.recall()
GLOB.emergency_shuttle.recall()
AreaSet()
MiscSet()
+5 -5
View File
@@ -214,8 +214,8 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
if(antag.is_latejoin_template())
latejoin_templates |= antag
if(emergency_shuttle && auto_recall_shuttle)
emergency_shuttle.auto_recall = 1
if(GLOB.emergency_shuttle && auto_recall_shuttle)
GLOB.emergency_shuttle.auto_recall = 1
feedback_set_details("round_start","[time2text(world.realtime)]")
INVOKE_ASYNC(SSdbcore, TYPE_PROC_REF(/datum/controller/subsystem/dbcore, SetRoundStart))
@@ -267,14 +267,14 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time, and post-evacuation recovery efforts will be substantially delayed.","Emergency Transmission")
/datum/game_mode/proc/check_finished()
if(emergency_shuttle.returned() || station_was_nuked)
if(GLOB.emergency_shuttle.returned() || station_was_nuked)
return 1
if(end_on_antag_death && antag_templates && antag_templates.len)
for(var/datum/antagonist/antag in antag_templates)
if(!antag.antags_are_dead())
return 0
if(CONFIG_GET(flag/continuous_rounds))
emergency_shuttle.auto_recall = 0
GLOB.emergency_shuttle.auto_recall = 0
return 0
return 1
return 0
@@ -344,7 +344,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
var/text = ""
if(surviving_total > 0)
text += "<br>There [surviving_total>1 ? ("were " + span_bold("[surviving_total] survivors")) : ("was " + span_bold("one survivor"))] ("
text += span_bold("[escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]") + ") and " + span_bold("[ghosts] ghosts")
text += span_bold("[escaped_total>0 ? escaped_total : "none"] [GLOB.emergency_shuttle.evac ? "escaped" : "transferred"]") + ") and " + span_bold("[ghosts] ghosts")
text += ".<br>"
else
text += "There were " + span_bold("no survivors") + " (" + span_bold("[ghosts] ghosts") + ")."
+2 -2
View File
@@ -28,10 +28,10 @@
/datum/game_mode/proc/try_latespawn(var/datum/mind/player, var/latejoin_only)
if(emergency_shuttle.departed || !round_autoantag)
if(GLOB.emergency_shuttle.departed || !round_autoantag)
return
if(emergency_shuttle.shuttle && (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP || emergency_shuttle.shuttle.moving_status == SHUTTLE_INTRANSIT))
if(GLOB.emergency_shuttle.shuttle && (GLOB.emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP || GLOB.emergency_shuttle.shuttle.moving_status == SHUTTLE_INTRANSIT))
return // Don't do anything if the shuttle's coming.
var/mills = round_duration_in_ds
+6 -6
View File
@@ -267,7 +267,7 @@ datum
explanation_text = "Frame [target.current.real_name], the [target.assigned_role] for a crime and make sure they are arrested and brought back to the CentCom station alive. We'll handle the rest from there."
check_completion()
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(target.current.stat == 2)
return 0
@@ -313,7 +313,7 @@ datum
explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] mercenary [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention."
check_completion()
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(target.current.stat == 2)
@@ -477,7 +477,7 @@ datum
explanation_text = "Hijack the emergency shuttle by escaping alone."
check_completion()
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(!owner.current || owner.current.stat == 2)
@@ -512,7 +512,7 @@ datum
explanation_text = "Escape on the shuttle alive, without being arrested."
check_completion()
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(!owner.current || owner.current.stat ==2)
@@ -1230,7 +1230,7 @@ datum
check_completion()
if(!istype(owner.current, /mob/living/silicon))
return 0
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(!owner.current)
return 0
@@ -1457,7 +1457,7 @@ datum
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
+1 -1
View File
@@ -41,7 +41,7 @@ GLOBAL_LIST_EMPTY(nuke_disks)
if(!is_type_in_list(disk_area, GLOB.centcom_areas))
disk_rescued = 0
break
var/crew_evacuated = (emergency_shuttle.returned())
var/crew_evacuated = (GLOB.emergency_shuttle.returned())
if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
feedback_set_details("round_end_result","win - syndicate nuke")
+4 -4
View File
@@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
/datum/objective/hijack/check_completion()
if(!owner.current || owner.current.stat)
return 0
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(issilicon(owner.current))
return 0
@@ -241,7 +241,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
/datum/objective/block/check_completion()
if(!istype(owner.current, /mob/living/silicon))
return 0
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(!owner.current)
return 0
@@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
/datum/objective/silence/check_completion()
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
for(var/mob/living/player in GLOB.player_list)
@@ -284,7 +284,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
return 0
if(isbrain(owner.current))
return 0
if(!emergency_shuttle.returned())
if(!GLOB.emergency_shuttle.returned())
return 0
if(!owner.current || owner.current.stat ==2)
return 0
+1 -1
View File
@@ -14,4 +14,4 @@
/datum/game_mode/sandbox/post_setup()
..()
if(emergency_shuttle)
emergency_shuttle.auto_recall = 1
GLOB.emergency_shuttle.auto_recall = 1
@@ -35,7 +35,7 @@
// Gives a random spell.
/obj/item/spell/gambit/proc/random_spell()
var/list/potential_spells = all_technomancer_gambit_spells.Copy()
var/list/potential_spells = GLOB.all_technomancer_gambit_spells.Copy()
var/rare_spell_chance = between(0, calculate_spell_power(100) - 100, 100) // Having 120% spellpower means a 20% chance to get to roll for rare spells.
if(prob(rare_spell_chance))
potential_spells += rare_spells.Copy()
@@ -119,6 +119,6 @@
// Fallback method in case nothing gets added.
if(!potential_spells.len)
potential_spells = all_technomancer_gambit_spells.Copy()
potential_spells = GLOB.all_technomancer_gambit_spells.Copy()
return pick(potential_spells)
+3 -3
View File
@@ -310,14 +310,14 @@
/obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0)
alarm_on = 1
camera_alarm.triggerAlarm(loc, src, duration)
GLOB.camera_alarm.triggerAlarm(loc, src, duration)
/obj/machinery/camera/proc/cancelCameraAlarm()
if(wires.is_cut(WIRE_CAM_ALARM))
return
alarm_on = 0
camera_alarm.clearAlarm(loc, src)
GLOB.camera_alarm.clearAlarm(loc, src)
//if false, then the camera is listed as DEACTIVATED and cannot be used
/obj/machinery/camera/proc/can_use()
@@ -462,7 +462,7 @@
/obj/machinery/camera/proc/update_coverage(var/network_change = 0)
if(network_change)
var/list/open_networks = difflist(network, restricted_camera_networks)
var/list/open_networks = difflist(network, GLOB.restricted_camera_networks)
// Add or remove camera from the camera net as necessary
if(on_open_network && !open_networks.len)
cameranet.removeCamera(src)
+2 -2
View File
@@ -42,7 +42,7 @@
if (!status || (stat & NOPOWER))
return 0
if (detectTime == -1)
motion_alarm.clearAlarm(loc, src)
GLOB.motion_alarm.clearAlarm(loc, src)
detectTime = 0
return 1
@@ -50,7 +50,7 @@
if (!status || (stat & NOPOWER))
return 0
if (!detectTime) return 0
motion_alarm.triggerAlarm(loc, src)
GLOB.motion_alarm.triggerAlarm(loc, src)
detectTime = -1
return 1
+7 -7
View File
@@ -8,10 +8,10 @@
/obj/machinery/computer/atmos_alert/Initialize(mapload)
. = ..()
atmosphere_alarm.register_alarm(src, /atom/proc/update_icon)
GLOB.atmosphere_alarm.register_alarm(src, /atom/proc/update_icon)
/obj/machinery/computer/atmos_alert/Destroy()
atmosphere_alarm.unregister_alarm(src)
GLOB.atmosphere_alarm.unregister_alarm(src)
. = ..()
/obj/machinery/computer/atmos_alert/attack_hand(mob/user)
@@ -28,10 +28,10 @@
var/list/major_alarms = list()
var/list/minor_alarms = list()
for(var/datum/alarm/alarm in atmosphere_alarm.major_alarms(get_z(src)))
for(var/datum/alarm/alarm in GLOB.atmosphere_alarm.major_alarms(get_z(src)))
major_alarms[++major_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
for(var/datum/alarm/alarm in atmosphere_alarm.minor_alarms(get_z(src)))
for(var/datum/alarm/alarm in GLOB.atmosphere_alarm.minor_alarms(get_z(src)))
minor_alarms[++minor_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
data["priority_alarms"] = major_alarms
@@ -41,11 +41,11 @@
/obj/machinery/computer/atmos_alert/update_icon()
if(!(stat & (NOPOWER|BROKEN)))
var/list/alarms = atmosphere_alarm.major_alarms()
var/list/alarms = GLOB.atmosphere_alarm.major_alarms()
if(alarms.len)
icon_screen = "alert:2"
else
alarms = atmosphere_alarm.minor_alarms()
alarms = GLOB.atmosphere_alarm.minor_alarms()
if(alarms.len)
icon_screen = "alert:1"
else
@@ -58,7 +58,7 @@
switch(action)
if("clear")
var/datum/alarm/alarm = locate(params["ref"]) in atmosphere_alarm.alarms
var/datum/alarm/alarm = locate(params["ref"]) in GLOB.atmosphere_alarm.alarms
if(alarm)
for(var/datum/alarm_source/alarm_source in alarm.sources)
var/obj/machinery/alarm/air_alarm = alarm_source.source
+5 -5
View File
@@ -10,7 +10,7 @@
/obj/machinery/computer/shuttle/attackby(var/obj/item/card/W as obj, var/mob/user as mob)
if(stat & (BROKEN|NOPOWER)) return
if ((!( istype(W, /obj/item/card) ) || !( SSticker ) || emergency_shuttle.location() || !( user ))) return
if ((!( istype(W, /obj/item/card) ) || !( SSticker ) || GLOB.emergency_shuttle.location() || !( user ))) return
if (istype(W, /obj/item/card/id)||istype(W, /obj/item/pda))
if (istype(W, /obj/item/pda))
var/obj/item/pda/pda = W
@@ -29,7 +29,7 @@
return 0
var/choice = tgui_alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", list("Authorize", "Repeal", "Abort"))
if(emergency_shuttle.location() && user.get_active_hand() != W)
if(GLOB.emergency_shuttle.location() && user.get_active_hand() != W)
return 0
switch(choice)
if("Authorize")
@@ -43,7 +43,7 @@
message_admins("[key_name_admin(user)] has launched the shuttle")
log_game("[user.ckey] has launched the shuttle early")
to_chat(world, span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!"))
emergency_shuttle.set_launch_countdown(10)
GLOB.emergency_shuttle.set_launch_countdown(10)
//src.authorized = null
qdel(src.authorized)
src.authorized = list( )
@@ -60,11 +60,11 @@
else if (istype(W, /obj/item/card/emag) && !emagged)
var/choice = tgui_alert(user, "Would you like to launch the shuttle?", "Shuttle control", list("Launch", "Cancel"))
if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W)
if(!emagged && !GLOB.emergency_shuttle.location() && user.get_active_hand() == W)
switch(choice)
if("Launch")
to_chat(world, span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!"))
emergency_shuttle.set_launch_countdown(10)
GLOB.emergency_shuttle.set_launch_countdown(10)
emagged = 1
if("Cancel")
return
+33 -33
View File
@@ -4,12 +4,12 @@
#define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock
#define SPECOPS_RETURN_DELAY 600 //Time between the shuttle is capable of moving.
var/specops_shuttle_moving_to_station = 0
var/specops_shuttle_moving_to_centcom = 0
var/specops_shuttle_at_station = 0
var/specops_shuttle_can_send = 1
var/specops_shuttle_time = 0
var/specops_shuttle_timeleft = 0
GLOBAL_VAR_INIT(specops_shuttle_moving_to_station, 0)
GLOBAL_VAR_INIT(specops_shuttle_moving_to_centcom, 0)
GLOBAL_VAR_INIT(specops_shuttle_at_station, 0)
GLOBAL_VAR_INIT(specops_shuttle_can_send, 1)
GLOBAL_VAR_INIT(specops_shuttle_time, 0)
GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
/obj/machinery/computer/specops_shuttle
name = "special operations shuttle control console"
@@ -32,16 +32,16 @@ var/specops_shuttle_timeleft = 0
if(announcer)
announcer.autosay(message, "A.L.I.C.E.", CHANNEL_RESPONSE_TEAM)
while(specops_shuttle_time - world.timeofday > 0)
var/ticksleft = specops_shuttle_time - world.timeofday
while(GLOB.specops_shuttle_time - world.timeofday > 0)
var/ticksleft = GLOB.specops_shuttle_time - world.timeofday
if(ticksleft > 1e5)
specops_shuttle_time = world.timeofday + 10 // midnight rollover
specops_shuttle_timeleft = (ticksleft / 10)
GLOB.specops_shuttle_time = world.timeofday + 10 // midnight rollover
GLOB.specops_shuttle_timeleft = (ticksleft / 10)
//All this does is announce the time before launch.
if(announcer)
var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
var/rounded_time_left = round(GLOB.specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\""
if(rounded_time_left==0)
@@ -52,10 +52,10 @@ var/specops_shuttle_timeleft = 0
sleep(5)
specops_shuttle_moving_to_station = 0
specops_shuttle_moving_to_centcom = 0
GLOB.specops_shuttle_moving_to_station = 0
GLOB.specops_shuttle_moving_to_centcom = 0
specops_shuttle_at_station = 1
GLOB.specops_shuttle_at_station = 1
var/area/start_location = locate(/area/shuttle/specops/station)
var/area/end_location = locate(/area/shuttle/specops/centcom)
@@ -90,7 +90,7 @@ var/specops_shuttle_timeleft = 0
var/mob/M = locate(/mob) in T
to_chat(M, span_notice("You have arrived at [using_map.boss_name]. Operation has ended!"))
specops_shuttle_at_station = 0
GLOB.specops_shuttle_at_station = 0
for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
@@ -109,16 +109,16 @@ var/specops_shuttle_timeleft = 0
// message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
// announcer.autosay(message, "A.L.I.C.E.", CHANNEL_RESPONSE_TEAM)
while(specops_shuttle_time - world.timeofday > 0)
var/ticksleft = specops_shuttle_time - world.timeofday
while(GLOB.specops_shuttle_time - world.timeofday > 0)
var/ticksleft = GLOB.specops_shuttle_time - world.timeofday
if(ticksleft > 1e5)
specops_shuttle_time = world.timeofday + 10 // midnight rollover
specops_shuttle_timeleft = (ticksleft / 10)
GLOB.specops_shuttle_time = world.timeofday + 10 // midnight rollover
GLOB.specops_shuttle_timeleft = (ticksleft / 10)
//All this does is announce the time before launch.
if(announcer)
var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
var/rounded_time_left = round(GLOB.specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\""
if(rounded_time_left==0)
@@ -129,11 +129,11 @@ var/specops_shuttle_timeleft = 0
sleep(5)
specops_shuttle_moving_to_station = 0
specops_shuttle_moving_to_centcom = 0
GLOB.specops_shuttle_moving_to_station = 0
GLOB.specops_shuttle_moving_to_centcom = 0
specops_shuttle_at_station = 1
if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
GLOB.specops_shuttle_at_station = 1
if (GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
to_chat(usr, span_warning("The Special Operations shuttle is unable to leave."))
@@ -239,7 +239,7 @@ var/specops_shuttle_timeleft = 0
qdel(announcer)
/proc/specops_can_move()
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom)
if(GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom)
return 0
for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
if(world.timeofday <= S.specops_shuttle_timereset)
@@ -266,8 +266,8 @@ var/specops_shuttle_timeleft = 0
dat = temp
else
dat += {"<BR><B>Special Operations Shuttle</B><HR>
\nLocation: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name()] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]<BR>
[specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*<BR>\n<BR>":specops_shuttle_at_station ? "\n<A href='byond://?src=\ref[src];sendtodock=1'>Shuttle standing by...</A><BR>\n<BR>":"\n<A href='byond://?src=\ref[src];sendtostation=1'>Depart to [station_name()]</A><BR>\n<BR>"]
\nLocation: [GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom ? "Departing for [station_name()] in ([GLOB.specops_shuttle_timeleft] seconds.)":GLOB.specops_shuttle_at_station ? "Station":"Dock"]<BR>
[GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*<BR>\n<BR>":GLOB.specops_shuttle_at_station ? "\n<A href='byond://?src=\ref[src];sendtodock=1'>Shuttle standing by...</A><BR>\n<BR>":"\n<A href='byond://?src=\ref[src];sendtostation=1'>Depart to [station_name()]</A><BR>\n<BR>"]
\n<A href='byond://?src=\ref[user];mach_close=computer'>Close</A>"}
var/datum/browser/popup = new(usr, "computer", "Computer", 575, 450)
@@ -282,7 +282,7 @@ var/specops_shuttle_timeleft = 0
usr.set_machine(src)
if (href_list["sendtodock"])
if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if(!GLOB.specops_shuttle_at_station|| GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
to_chat(usr, span_notice("[using_map.boss_name] will not allow the Special Operations shuttle to return yet."))
@@ -297,13 +297,13 @@ var/specops_shuttle_timeleft = 0
temp += "Shuttle departing.<BR><BR><A href='byond://?src=\ref[src];mainmenu=1'>OK</A>"
updateUsrDialog(usr)
specops_shuttle_moving_to_centcom = 1
specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
GLOB.specops_shuttle_moving_to_centcom = 1
GLOB.specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
spawn(0)
specops_return()
else if (href_list["sendtostation"])
if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if(GLOB.specops_shuttle_at_station || GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
to_chat(usr, span_warning("The Special Operations shuttle is unable to leave."))
@@ -317,9 +317,9 @@ var/specops_shuttle_timeleft = 0
var/area/centcom/specops/special_ops = locate()
if(special_ops)
special_ops.readyalert()//Trigger alarm for the spec ops area.
specops_shuttle_moving_to_station = 1
GLOB.specops_shuttle_moving_to_station = 1
specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
GLOB.specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
spawn(0)
specops_process()
+2 -2
View File
@@ -176,7 +176,7 @@ FIRE ALARM
return
var/area/area = get_area(src)
for(var/obj/machinery/firealarm/FA in area)
fire_alarm.clearAlarm(src.loc, FA)
GLOB.fire_alarm.clearAlarm(src.loc, FA)
update_icon()
if(user)
log_game("[user] reset a fire alarm at [COORD(src)]")
@@ -186,7 +186,7 @@ FIRE ALARM
return
var/area/area = get_area(src)
for(var/obj/machinery/firealarm/FA in area)
fire_alarm.triggerAlarm(loc, FA, duration, hidden = alarms_hidden)
GLOB.fire_alarm.triggerAlarm(loc, FA, duration, hidden = alarms_hidden)
update_icon()
playsound(src, 'sound/machines/airalarm.ogg', 25, 0, 4, volume_channel = VOLUME_CHANNEL_ALARMS)
if(user)
+7 -7
View File
@@ -1,4 +1,4 @@
var/list/floor_light_cache = list()
GLOBAL_LIST_EMPTY(floor_light_cache)
/obj/item/floor_light
name = "floor light kit"
@@ -124,22 +124,22 @@ var/list/floor_light_cache = list()
if(use_power && !broken())
if(isnull(damaged))
var/cache_key = "floorlight-[default_light_colour]"
if(!floor_light_cache[cache_key])
if(!GLOB.floor_light_cache[cache_key])
var/image/I = image("on")
I.color = default_light_colour
I.layer = layer+0.001
floor_light_cache[cache_key] = I
add_overlay(floor_light_cache[cache_key])
GLOB.floor_light_cache[cache_key] = I
add_overlay(GLOB.floor_light_cache[cache_key])
else
if(damaged == 0) //Needs init.
damaged = rand(1,4)
var/cache_key = "floorlight-broken[damaged]-[default_light_colour]"
if(!floor_light_cache[cache_key])
if(!GLOB.floor_light_cache[cache_key])
var/image/I = image("flicker[damaged]")
I.color = default_light_colour
I.layer = layer+0.001
floor_light_cache[cache_key] = I
add_overlay(floor_light_cache[cache_key])
GLOB.floor_light_cache[cache_key] = I
add_overlay(GLOB.floor_light_cache[cache_key])
/obj/machinery/floor_light/proc/broken()
return (stat & (BROKEN|NOPOWER))
+8 -8
View File
@@ -95,20 +95,20 @@
if(STATUS_DISPLAY_BLANK) //blank
return 1
if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer
if(!emergency_shuttle)
if(!GLOB.emergency_shuttle)
message1 = "-ETA-"
message2 = "Never" // You're here forever.
return 1
if(emergency_shuttle.waiting_to_leave())
if(GLOB.emergency_shuttle.waiting_to_leave())
message1 = "-ETD-"
if(emergency_shuttle.shuttle.is_launching())
if(GLOB.emergency_shuttle.shuttle.is_launching())
message2 = "Launch"
else
message2 = get_shuttle_timer_departure()
if(length(message2) > CHARS_PER_LINE)
message2 = "Error"
update_display(message1, message2)
else if(emergency_shuttle.has_eta())
else if(GLOB.emergency_shuttle.has_eta())
message1 = "-ETA-"
message2 = get_shuttle_timer_arrival()
if(length(message2) > CHARS_PER_LINE)
@@ -207,17 +207,17 @@
maptext = new_text
/obj/machinery/status_display/proc/get_shuttle_timer_arrival()
if(!emergency_shuttle)
if(!GLOB.emergency_shuttle)
return "Error"
var/timeleft = emergency_shuttle.estimate_arrival_time()
var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time()
if(timeleft < 0)
return ""
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
/obj/machinery/status_display/proc/get_shuttle_timer_departure()
if(!emergency_shuttle)
if(!GLOB.emergency_shuttle)
return "Error"
var/timeleft = emergency_shuttle.estimate_launch_time()
var/timeleft = GLOB.emergency_shuttle.estimate_launch_time()
if(timeleft < 0)
return ""
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
@@ -80,7 +80,7 @@
to_chat(user, "No input found please hang up and try your call again.")
return
var/list/tempnetwork = splittext(input, ",")
tempnetwork = difflist(tempnetwork,restricted_camera_networks,1)
tempnetwork = difflist(tempnetwork, GLOB.restricted_camera_networks, 1)
if(tempnetwork.len < 1)
to_chat(user, "No network found please hang up and try your call again.")
return
@@ -2,7 +2,7 @@
* Donut Box
*/
var/list/random_weighted_donuts = list(
GLOBAL_LIST_INIT(random_weighted_donuts, list(
/obj/item/reagent_containers/food/snacks/donut/plain = 5,
/obj/item/reagent_containers/food/snacks/donut/plain/jelly = 5,
/obj/item/reagent_containers/food/snacks/donut/pink = 4,
@@ -26,7 +26,7 @@ var/list/random_weighted_donuts = list(
/obj/item/reagent_containers/food/snacks/donut/choc_sprinkles = 3,
/obj/item/reagent_containers/food/snacks/donut/choc_sprinkles/jelly = 3,
/obj/item/reagent_containers/food/snacks/donut/chaos = 1
)
))
/obj/item/storage/box/donut
icon = 'icons/obj/food_donuts.dmi'
@@ -43,7 +43,7 @@ var/list/random_weighted_donuts = list(
/obj/item/storage/box/donut/Initialize(mapload)
if(!empty)
for(var/i in 1 to 6)
var/type_to_spawn = pickweight(random_weighted_donuts)
var/type_to_spawn = pickweight(GLOB.random_weighted_donuts)
new type_to_spawn(src)
. = ..()
update_icon()
@@ -1,6 +1,6 @@
#define TANK_IDEAL_PRESSURE 1015 //Arbitrary.
var/list/global/tank_gauge_cache = list()
GLOBAL_LIST_EMPTY(tank_gauge_cache)
/obj/item/tank
name = "tank"
@@ -377,9 +377,9 @@ var/list/global/tank_gauge_cache = list()
cut_overlays()
add_bomb_overlay()
var/indicator = "[gauge_icon][(gauge_pressure == -1) ? "overload" : gauge_pressure]"
if(!tank_gauge_cache[indicator])
tank_gauge_cache[indicator] = image(icon, indicator)
add_overlay(tank_gauge_cache[indicator])
if(!GLOB.tank_gauge_cache[indicator])
GLOB.tank_gauge_cache[indicator] = image(icon, indicator)
add_overlay(GLOB.tank_gauge_cache[indicator])
+3 -3
View File
@@ -238,7 +238,7 @@
to_chat(user, span_notice("There isn't enough material here to construct a wall."))
return FALSE
var/datum/material/M = name_to_material[S.default_type]
var/datum/material/M = GLOB.name_to_material[S.default_type]
if(!istype(M))
return FALSE
@@ -279,7 +279,7 @@
to_chat(user, span_notice("There isn't enough material here to reinforce the girder."))
return 0
var/datum/material/M = name_to_material[S.default_type]
var/datum/material/M = GLOB.name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.")
return 0
@@ -412,7 +412,7 @@
var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built.
// Apparently set_material(...) for walls requires refs to the material singletons and not strings.
// This is different from how other material objects with their own set_material(...) do it, but whatever.
var/datum/material/M = name_to_material[the_rcd.material_to_use]
var/datum/material/M = GLOB.name_to_material[the_rcd.material_to_use]
new_T.set_material(M, the_rcd.make_rwalls ? M : null, girder_material)
new_T.add_hiddenprint(user)
qdel(src)
+7 -8
View File
@@ -1,16 +1,15 @@
var/list/flooring_types
GLOBAL_LIST_EMPTY(flooring_types)
/proc/populate_flooring_types()
flooring_types = list()
for (var/flooring_path in typesof(/decl/flooring))
flooring_types["[flooring_path]"] = new flooring_path
GLOB.flooring_types["[flooring_path]"] = new flooring_path
/proc/get_flooring_data(var/flooring_path)
if(!flooring_types)
flooring_types = list()
if(!flooring_types["[flooring_path]"])
flooring_types["[flooring_path]"] = new flooring_path
return flooring_types["[flooring_path]"]
if(!GLOB.flooring_types)
GLOB.flooring_types = list()
if(!GLOB.flooring_types["[flooring_path]"])
GLOB.flooring_types["[flooring_path]"] = new flooring_path
return GLOB.flooring_types["[flooring_path]"]
// State values:
// [icon_base]: initial base icon_state without edges or corners.
+1 -1
View File
@@ -150,7 +150,7 @@
var/turf/simulated/wall/T = get_turf(src) // Ref to the wall we just built.
// Apparently set_material(...) for walls requires refs to the material singletons and not strings.
// This is different from how other material objects with their own set_material(...) do it, but whatever.
var/datum/material/M = name_to_material[the_rcd.material_to_use]
var/datum/material/M = GLOB.name_to_material[the_rcd.material_to_use]
T.set_material(M, the_rcd.make_rwalls ? M : null, M)
T.add_hiddenprint(user)
return TRUE
+2 -2
View File
@@ -107,8 +107,8 @@
return
var/obj/item/stack/S = C
var/decl/flooring/use_flooring
for(var/flooring_type in flooring_types)
var/decl/flooring/F = flooring_types[flooring_type]
for(var/flooring_type in GLOB.flooring_types)
var/decl/flooring/F = GLOB.flooring_types[flooring_type]
if(!F.build_type)
continue
if((S.type == F.build_type) || (S.build_type == F.build_type))
@@ -1,7 +1,3 @@
var/list/grass_types = list(
)
/turf/simulated/floor/outdoors/grass
name = "grass"
icon_state = "grass0"