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
+1 -1
View File
@@ -527,7 +527,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
message_admins(span_blue("[key_name_admin(usr)] told everyone to man up and deal with it."), 1)
ADMIN_VERB(give_spell, R_FUN, "Give Spell", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/spell_recipient)
var/spell/S = tgui_input_list(user, "Choose the spell to give to that guy", "ABRAKADABRA", spells)
var/spell/S = tgui_input_list(user, "Choose the spell to give to that guy", "ABRAKADABRA", typesof(/spell))
if(!S)
return
spell_recipient.spell_list += new S
+6 -6
View File
@@ -395,19 +395,19 @@
dat += "Current Game Mode: " + span_bold("[SSticker.mode.name]") + "<BR>"
dat += "Round Duration: " + span_bold("[roundduration2text()]") + "<BR>"
dat += span_bold("Emergency shuttle") + "<BR>"
if (!emergency_shuttle.online())
if (!GLOB.emergency_shuttle.online())
dat += "<a href='byond://?src=\ref[src];[HrefToken()];call_shuttle=1'>Call Shuttle</a><br>"
else
if (emergency_shuttle.wait_for_launch)
var/timeleft = emergency_shuttle.estimate_launch_time()
if (GLOB.emergency_shuttle.wait_for_launch)
var/timeleft = GLOB.emergency_shuttle.estimate_launch_time()
dat += "ETL: <a href='byond://?src=\ref[src];[HrefToken()];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
else if (emergency_shuttle.shuttle.has_arrive_time())
var/timeleft = emergency_shuttle.estimate_arrival_time()
else if (GLOB.emergency_shuttle.shuttle.has_arrive_time())
var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time()
dat += "ETA: <a href='byond://?src=\ref[src];[HrefToken()];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='byond://?src=\ref[src];[HrefToken()];call_shuttle=2'>Send Back</a><br>"
if (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP)
if (GLOB.emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP)
dat += "Launching now..."
dat += "<a href='byond://?src=\ref[src];[HrefToken()];delay_round_end=1'>[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
+14 -14
View File
@@ -83,23 +83,23 @@
switch(href_list["call_shuttle"])
if("1")
if ((!( SSticker ) || !emergency_shuttle.location()))
if ((!( SSticker ) || !GLOB.emergency_shuttle.location()))
return
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
if (GLOB.emergency_shuttle.can_call())
GLOB.emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins(span_blue("[key_name_admin(usr)] called the Emergency Shuttle to the station."), 1)
if("2")
if (!( SSticker ) || !emergency_shuttle.location())
if (!( SSticker ) || !GLOB.emergency_shuttle.location())
return
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
if (GLOB.emergency_shuttle.can_call())
GLOB.emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins(span_blue("[key_name_admin(usr)] called the Emergency Shuttle to the station."), 1)
else if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
else if (GLOB.emergency_shuttle.can_recall())
GLOB.emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins(span_blue("[key_name_admin(usr)] sent the Emergency Shuttle back."), 1)
@@ -108,17 +108,17 @@
else if(href_list["edit_shuttle_time"])
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
var/new_time_left = tgui_input_number(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() )
if (GLOB.emergency_shuttle.wait_for_launch)
var/new_time_left = tgui_input_number(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", GLOB.emergency_shuttle.estimate_launch_time() )
emergency_shuttle.launch_time = world.time + new_time_left*10
GLOB.emergency_shuttle.launch_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]")
message_admins(span_blue("[key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]"), 1)
else if (emergency_shuttle.shuttle.has_arrive_time())
else if (GLOB.emergency_shuttle.shuttle.has_arrive_time())
var/new_time_left = tgui_input_number(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() )
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
var/new_time_left = tgui_input_number(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", GLOB.emergency_shuttle.estimate_arrival_time() )
GLOB.emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
message_admins(span_blue("[key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]"), 1)
+9 -9
View File
@@ -869,7 +869,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Admin.Events"
set name = "Call Shuttle"
if ((!( SSticker ) || !emergency_shuttle.location()))
if ((!( SSticker ) || !GLOB.emergency_shuttle.location()))
return
if(!check_rights(R_ADMIN)) return
@@ -881,15 +881,15 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(SSticker.mode.auto_recall_shuttle)
choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", "Shuttle Call", list("Confirm", "Cancel"))
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
GLOB.emergency_shuttle.auto_recall = 1 //enable auto-recall
else
return
choice = tgui_input_list(usr, "Is this an emergency evacuation or a crew transfer?", "Shuttle Call", list("Emergency", "Crew Transfer"))
if (choice == "Emergency")
emergency_shuttle.call_evac()
GLOB.emergency_shuttle.call_evac()
else
emergency_shuttle.call_transfer()
GLOB.emergency_shuttle.call_transfer()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -905,10 +905,10 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") return
if(!SSticker || !emergency_shuttle.can_recall())
if(!SSticker || !GLOB.emergency_shuttle.can_recall())
return
emergency_shuttle.recall()
GLOB.emergency_shuttle.recall()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins(span_blue("[key_name_admin(usr)] admin-recalled the emergency shuttle."), 1)
@@ -924,10 +924,10 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(!check_rights(R_ADMIN)) return
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
GLOB.emergency_shuttle.deny_shuttle = !GLOB.emergency_shuttle.deny_shuttle
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
log_admin("[key_name(src)] has [GLOB.emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
message_admins("[key_name_admin(usr)] has [GLOB.emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in GLOB.mob_list)
set category = "Admin.Logs"
@@ -395,7 +395,7 @@
/datum/gear/collar/New()
..()
gear_tweaks += gear_tweak_collar_tag
gear_tweaks += GLOB.gear_tweak_collar_tag
/datum/gear/collar/golden
display_name = "collar, golden"
@@ -25,7 +25,7 @@
/datum/gear/fluff/collar/New()
..()
gear_tweaks += gear_tweak_collar_tag
gear_tweaks += GLOB.gear_tweak_collar_tag
// 0-9 CKEYS
/datum/gear/fluff/malady_crop
+6 -13
View File
@@ -36,7 +36,7 @@
*/
// Assoc list containing all material datums indexed by name.
var/list/name_to_material
GLOBAL_LIST_EMPTY(name_to_material)
//Returns the material the object is made of, if applicable.
//Will we ever need to return more than one value here? Or should we just return the "dominant" material.
@@ -95,21 +95,17 @@ var/list/name_to_material
// Builds the datum list above.
/proc/populate_material_list(force_remake=0)
if(name_to_material && !force_remake) return // Already set up!
name_to_material = list()
/proc/populate_material_list()
for(var/type in subtypesof(/datum/material))
var/datum/material/new_mineral = new type
if(!new_mineral.name)
continue
name_to_material[lowertext(new_mineral.name)] = new_mineral
GLOB.name_to_material[lowertext(new_mineral.name)] = new_mineral
return 1
// Safety proc to make sure the material list exists before trying to grab from it.
/proc/get_material_by_name(name)
if(!name_to_material)
populate_material_list()
return name_to_material[name]
return GLOB.name_to_material[name]
/proc/material_display_name(name)
if(istype(name, /datum/material)) //We were fed a datum.
@@ -133,15 +129,12 @@ var/list/name_to_material
* - The following elements are used to generate bespoke IDs
*/
/proc/_GetMaterialRef(list/arguments)
if(!name_to_material)
populate_material_list()
var/datum/material/key = arguments[1]
if(istype(key))
return key // we want to convert anything we're given to a material
if(istext(key)) // text ID
. = name_to_material[key]
. = GLOB.name_to_material[key]
if(!.)
WARNING("Attempted to fetch material ref with invalid text id '[key]'")
return
@@ -150,7 +143,7 @@ var/list/name_to_material
CRASH("Attempted to fetch material ref with invalid key [key]")
key = GetIdFromArguments(arguments)
. = name_to_material[key]
. = GLOB.name_to_material[key]
if(!.)
WARNING("Attempted to fetch nonexistent material with key [key]")
+2 -2
View File
@@ -246,8 +246,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/observer/dead/get_status_tab_items()
. = ..()
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(GLOB.emergency_shuttle)
var/eta_status = GLOB.emergency_shuttle.get_status_panel_eta()
if(eta_status)
. += ""
. += "[eta_status]"
@@ -1,4 +1,4 @@
var/list/_nymph_default_emotes = list(
GLOBAL_LIST_INIT(nymph_default_emotes, list(
/decl/emote/visible,
/decl/emote/visible/scratch,
/decl/emote/visible/drool,
@@ -22,7 +22,7 @@ var/list/_nymph_default_emotes = list(
/decl/emote/audible/bug_hiss,
/decl/emote/audible/bug_chitter,
/decl/emote/audible/chirp
)
))
/mob/living/carbon/alien/diona
name = "diona nymph"
@@ -47,7 +47,7 @@ var/list/_nymph_default_emotes = list(
var/obj/item/hat
/mob/living/carbon/alien/diona/get_available_emotes()
return global._nymph_default_emotes.Copy()
return GLOB.nymph_default_emotes.Copy()
/mob/living/carbon/alien/diona/Initialize(mapload)
. = ..()
@@ -1,4 +1,4 @@
var/list/_alien_default_emotes = list(
GLOBAL_LIST_INIT(alien_default_emotes, list(
/decl/emote/visible,
/decl/emote/visible/scratch,
/decl/emote/visible/drool,
@@ -25,7 +25,7 @@ var/list/_alien_default_emotes = list(
/decl/emote/audible/moan,
/decl/emote/audible/gnarl,
/decl/emote/audible/chirp
)
))
/mob/living/carbon/alien/get_available_emotes()
. = global._alien_default_emotes.Copy()
. = GLOB.alien_default_emotes.Copy()
@@ -1,4 +1,4 @@
var/list/_brain_default_emotes = list(
GLOBAL_LIST_INIT(brain_default_emotes, list(
/decl/emote/audible/alarm,
/decl/emote/audible/alert,
/decl/emote/audible/notice,
@@ -8,10 +8,10 @@ var/list/_brain_default_emotes = list(
/decl/emote/audible/boop,
/decl/emote/visible/blink,
/decl/emote/visible/flash
)
))
/mob/living/carbon/brain/can_emote()
return (istype(container, /obj/item/mmi) && ..())
/mob/living/carbon/brain/get_available_emotes()
return global._brain_default_emotes.Copy()
return GLOB.brain_default_emotes.Copy()
+6 -14
View File
@@ -1,4 +1,4 @@
var/list/_human_default_emotes = list(
GLOBAL_LIST_INIT(human_default_emotes, list(
/decl/emote/visible/blink,
/decl/emote/audible/synth,
/decl/emote/audible/synth/beep,
@@ -99,7 +99,6 @@ var/list/_human_default_emotes = list(
/decl/emote/visible/vomit,
/decl/emote/visible/floorspin,
/decl/emote/visible/flip,
//VOREStation Add
/decl/emote/audible/bug_hiss,
/decl/emote/audible/bug_buzz,
/decl/emote/audible/bug_chitter,
@@ -181,14 +180,9 @@ var/list/_human_default_emotes = list(
/decl/emote/audible/caw2,
/decl/emote/audible/caw_m,
/decl/emote/audible/gwah
))
//VOREStation Add End
)
//VOREStation Add Start
var/list/_simple_mob_default_emotes = list(
GLOBAL_LIST_INIT(simple_mob_default_emotes, list(
/decl/emote/visible/blink,
/decl/emote/visible/nod,
/decl/emote/visible/shake,
@@ -331,17 +325,15 @@ var/list/_simple_mob_default_emotes = list(
/decl/emote/audible/caw2,
/decl/emote/audible/caw_m,
/decl/emote/audible/gwah
)
//VOREStation Add End
))
/mob/living/carbon/human/get_available_emotes()
. = global._human_default_emotes.Copy()
. = GLOB.human_default_emotes.Copy()
if(length(species?.default_emotes))
return . | species.default_emotes
/mob/living/simple_mob/get_available_emotes()
. = global._simple_mob_default_emotes.Copy()
. = GLOB.simple_mob_default_emotes.Copy()
/mob/living/carbon/human/verb/pose()
set name = "Set Pose"
@@ -100,8 +100,8 @@
. += ""
. += "Intent: [a_intent]"
. += "Move Mode: [m_intent]"
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(GLOB.emergency_shuttle)
var/eta_status = GLOB.emergency_shuttle.get_status_panel_eta()
if(eta_status)
. += "[eta_status]"
@@ -188,8 +188,8 @@
return TRUE // yup
/mob/living/simple_mob/protean_blob/get_available_emotes()
var/list/fulllist = global._robot_default_emotes.Copy()
fulllist |= global._human_default_emotes //they're living nanites, they can make whatever sounds they want
var/list/fulllist = GLOB.robot_default_emotes.Copy()
fulllist |= GLOB.human_default_emotes //they're living nanites, they can make whatever sounds they want
return fulllist
/mob/living/simple_mob/protean_blob/update_misc_tabs()
+2 -2
View File
@@ -406,7 +406,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
call_shuttle_proc(src)
// hack to display shuttle timer
if(emergency_shuttle.online())
if(GLOB.emergency_shuttle.online())
post_status(src, "shuttle", user = src)
/mob/living/silicon/ai/proc/ai_recall_shuttle()
@@ -559,7 +559,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
for (var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1)
var/list/tempnetwork = difflist(C.network, GLOB.restricted_camera_networks, 1)
for(var/i in tempnetwork)
cameralist[i] = i
+6 -6
View File
@@ -1,4 +1,4 @@
var/list/_silicon_default_emotes = list(
GLOBAL_LIST_INIT(silicon_default_emotes, list(
/decl/emote/audible/synth,
/decl/emote/audible/synth/beep,
/decl/emote/audible/synth/bing,
@@ -13,15 +13,15 @@ var/list/_silicon_default_emotes = list(
/decl/emote/audible/synth/microwave,
/decl/emote/audible/synth/security,
/decl/emote/audible/synth/security/halt
)
))
/mob/living/silicon/get_available_emotes()
return global._silicon_default_emotes.Copy()
return GLOB.silicon_default_emotes.Copy()
/mob/living/silicon/pai/get_available_emotes()
var/list/fulllist = list()
fulllist |= _silicon_default_emotes
fulllist |= _robot_default_emotes
fulllist |= _human_default_emotes
fulllist |= GLOB.silicon_default_emotes
fulllist |= GLOB.robot_default_emotes
fulllist |= GLOB.human_default_emotes
return fulllist
@@ -1,4 +1,4 @@
var/list/_robot_default_emotes = list(
GLOBAL_LIST_INIT(robot_default_emotes, list(
/decl/emote/audible/clap,
/decl/emote/visible/bow,
/decl/emote/visible/salute,
@@ -29,13 +29,11 @@ var/list/_robot_default_emotes = list(
/decl/emote/audible/synth/microwave,
/decl/emote/audible/synth/security,
/decl/emote/audible/synth/security/halt,
//VOREStation Add
/decl/emote/visible/mlem,
/decl/emote/visible/blep
//VOREStation Add End
)
))
/mob/living/silicon/robot/get_available_emotes()
var/list/fulllist = global._robot_default_emotes.Copy()
fulllist |= _human_default_emotes
var/list/fulllist = GLOB.robot_default_emotes.Copy()
fulllist |= GLOB.human_default_emotes
return fulllist
+2 -2
View File
@@ -155,8 +155,8 @@
// this function displays the shuttles ETA in the status panel if the shuttle has been called
/mob/living/silicon/proc/show_emergency_shuttle_eta()
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(GLOB.emergency_shuttle)
var/eta_status = GLOB.emergency_shuttle.get_status_panel_eta()
if(eta_status)
. = "[eta_status]"
@@ -151,7 +151,7 @@
/mob/living/simple_mob/animal/synx/get_available_emotes()
. = ..()
. |= _human_default_emotes //Synx are great at mimicking
. |= GLOB.human_default_emotes //Synx are great at mimicking
/mob/living/simple_mob/animal/synx/ai //AI controlled variant
@@ -316,7 +316,7 @@
comp.dark_energy_infinite = TRUE
/mob/living/simple_mob/shadekin/red/rakshasa/get_available_emotes()
. = global._simple_mob_default_emotes.Copy()
. = GLOB.simple_mob_default_emotes.Copy()
. += /decl/emote/audible/evil_laugh
. += /decl/emote/audible/evil_no
. += /decl/emote/audible/evil_breathing
+1 -19
View File
@@ -2,24 +2,6 @@ GLOBAL_LIST_INIT(dsi_to_species, list(SPECIES_TAJARAN = "DSI - Tajaran", SPECIES
SPECIES_VULPKANIN = "DSI - Vulpkanin", SPECIES_AKULA = "DSI - Akula", SPECIES_VASILISSAN = "DSI - Vasilissan", SPECIES_ZORREN = "DSI - Zorren",\
SPECIES_TESHARI = "DSI - Teshari", SPECIES_FENNEC = "DSI - Fennec"))
//CitRP Port
var/const/cyberbeast_monitor_styles = "blank=cyber_blank;\
default=cyber_default;\
eyes=eyes;\
static=cyber_static;\
alert=cyber_alert;\
happy=cyber_happ;\
unhappy=cyber_unhapp;\
flat=cyber_flat;\
sad=cyber_sad;\
heart=cyber_heart;\
cross=cyber_cross;\
wave=cyber_wave;\
uwu=cyber_uwu;\
question=cyber_question;\
lowpower=cyber_lowpower;\
idle=cyber_idle;\
nwn=cyber_nwn"
// Placeholder for protean limbs during character spawning, before they have a properly set model
/datum/robolimb/protean
@@ -82,7 +64,7 @@ var/const/cyberbeast_monitor_styles = "blank=cyber_blank;\
unavailable_to_build = 1
parts = list(BP_HEAD)
monitor_icon = 'icons/mob/monitor_icons_vr.dmi'
monitor_styles = cyberbeast_monitor_styles
monitor_styles = CYBERBEAST_MONITOR_STYLES
/obj/item/disk/limb/cyber_beast
company = "Cyber Tech"
+6 -6
View File
@@ -1123,7 +1123,7 @@ GLOBAL_LIST_EMPTY(apcs)
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
autoflag = 0
// update icon & area power if anything changed
@@ -1147,27 +1147,27 @@ GLOBAL_LIST_EMPTY(apcs)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
autoflag = 3
power_alarm.clearAlarm(loc, src)
GLOB.power_alarm.clearAlarm(loc, src)
else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment
if(autoflag != 2)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
autoflag = 2
else if(cell.percent() <= 15) // <15%, turn off lighting & equipment
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
environ = autoset(environ, 1)
power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
autoflag = 1
else // zero charge, turn all off
if(autoflag != 0)
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
GLOB.power_alarm.triggerAlarm(loc, src, hidden=alarms_hidden)
autoflag = 0
// val 0=off, 1=off(auto) 2=on 3=on(auto)
@@ -1291,7 +1291,7 @@ GLOBAL_LIST_EMPTY(apcs)
//start with main breaker off, chargemode in the default state and all channels on auto upon reboot
operating = 0
chargemode = initial(chargemode)
power_alarm.clearAlarm(loc, src)
GLOB.power_alarm.clearAlarm(loc, src)
lighting = POWERCHAN_ON_AUTO
equipment = POWERCHAN_ON_AUTO
@@ -281,7 +281,7 @@
switch(action)
if("remove_mat")
var/datum/material/material = name_to_material[params["id"]]
var/datum/material/material = GLOB.name_to_material[params["id"]]
if(!istype(material))
return
+20 -11
View File
@@ -1,22 +1,22 @@
/*
File: Options
*/
var/const //Ascii values of characters
ascii_A =65
ascii_Z =90
ascii_a =97
ascii_z =122
ascii_DOLLAR = 36 // $
ascii_ZERO=48
ascii_NINE=57
ascii_UNDERSCORE=95 // _
//Ascii values of characters
#define ASCII_A 65
#define ASCII_Z 90
#define ASCII_LOWER_A 97
#define ASCII_LOWER_Z 122
#define ASCII_DOLLAR 36 // $
#define ASCII_ZERO 48
#define ASCII_NINE 57
#define ASCII_UNDERSCORE 95 // _
/*
Class: n_scriptOptions
*/
/n_scriptOptions/proc/CanStartID(char) //returns true if the character can start a variable, function, or keyword name (by default letters or an underscore)
if(!isnum(char))char=text2ascii(char)
return (char in ascii_A to ascii_Z) || (char in ascii_a to ascii_z) || char==ascii_UNDERSCORE || char==ascii_DOLLAR
return (char in ASCII_A to ASCII_Z) || (char in ASCII_LOWER_A to ASCII_LOWER_Z) || char==ASCII_UNDERSCORE || char==ASCII_DOLLAR
/n_scriptOptions/proc/IsValidIDChar(char) //returns true if the character can be in the body of a variable, function, or keyword name (by default letters, numbers, and underscore)
if(!isnum(char))char=text2ascii(char)
@@ -24,7 +24,7 @@ var/const //Ascii values of characters
/n_scriptOptions/proc/IsDigit(char)
if(!isnum(char))char=text2ascii(char)
return char in ascii_ZERO to ascii_NINE
return char in ASCII_ZERO to ASCII_NINE
/n_scriptOptions/proc/IsValidID(id) //returns true if all the characters in the string are okay to be in an identifier name
if(!CanStartID(id)) //don't need to grab first char in id, since text2ascii does it automatically
@@ -98,3 +98,12 @@ associated values are <nS_Keyword> types of which the <n_Keyword.Parse()> proc w
.=..()
for(var/O in assign_operators+binary_operators+unary_operators)
if(!symbols.Find(O)) symbols+=O
#undef ASCII_A
#undef ASCII_Z
#undef ASCII_LOWER_A
#undef ASCII_LOWER_Z
#undef ASCII_DOLLAR
#undef ASCII_ZERO
#undef ASCII_NINE
#undef ASCII_UNDERSCORE
+4 -4
View File
@@ -4,9 +4,9 @@
/datum/shuttle/autodock/ferry/escape_pod/New()
move_time = move_time + rand(-30, 60)
if(name in emergency_shuttle.escape_pods)
if(name in GLOB.emergency_shuttle.escape_pods)
CRASH("An escape pod with the name '[name]' has already been defined.")
emergency_shuttle.escape_pods[name] = src
GLOB.emergency_shuttle.escape_pods[name] = src
..()
@@ -56,7 +56,7 @@
"docking_status" = docking_program.get_docking_status(),
"override_enabled" = docking_program.override_enabled,
"exterior_status" = docking_program.memory["door_status"], // TGUI DATA fails silently when there's no linked pod, leading to UI crashes
"can_force" = pod?.can_force() || (emergency_shuttle.departed && pod?.can_launch()), //allow players to manually launch ahead of time if the shuttle leaves
"can_force" = pod?.can_force() || (GLOB.emergency_shuttle.departed && pod?.can_launch()), //allow players to manually launch ahead of time if the shuttle leaves
"armed" = pod?.arming_controller.armed,
"internalTemplateName" = "EscapePodConsole",
)
@@ -72,7 +72,7 @@
if("force_launch")
if(pod.can_force())
pod.force_launch(src)
else if(emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves
else if(GLOB.emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves
pod.launch(src)
. = TRUE
+13 -13
View File
@@ -7,9 +7,9 @@
/datum/shuttle/autodock/ferry/emergency/New()
..()
radio_connection = SSradio.add_object(src, frequency, null)
if(emergency_shuttle.shuttle)
if(GLOB.emergency_shuttle.shuttle)
CRASH("An emergency shuttle has already been defined.")
emergency_shuttle.shuttle = src
GLOB.emergency_shuttle.shuttle = src
/datum/shuttle/autodock/ferry/emergency/arrived()
. = ..()
@@ -17,7 +17,7 @@
var/obj/machinery/computer/shuttle_control/emergency/C = in_use
C.reset_authorization()
emergency_shuttle.shuttle_arrived()
GLOB.emergency_shuttle.shuttle_arrived()
/datum/shuttle/autodock/ferry/emergency/long_jump(var/destination, var/interim, var/travel_time)
if (!location)
@@ -27,17 +27,17 @@
//update move_time and launch_time so we get correct ETAs
move_time = travel_time
emergency_shuttle.launch_time = world.time
GLOB.emergency_shuttle.launch_time = world.time
..(destination, interim, travel_time, direction)
/datum/shuttle/autodock/ferry/emergency/perform_shuttle_move()
if (current_location == landmark_station) //leaving the station
spawn(0)
emergency_shuttle.departed = 1
var/estimated_time = round(emergency_shuttle.estimate_arrival_time()/60,1)
GLOB.emergency_shuttle.departed = 1
var/estimated_time = round(GLOB.emergency_shuttle.estimate_arrival_time()/60,1)
if (emergency_shuttle.evac)
if (GLOB.emergency_shuttle.evac)
priority_announcement.Announce(replacetext(replacetext(using_map.emergency_shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"))
else
priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_leaving_dock, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"), "Transfer System", 'sound/AI/tramdepart.ogg')
@@ -71,8 +71,8 @@
if (!can_launch(user)) return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
if (GLOB.emergency_shuttle.autopilot)
GLOB.emergency_shuttle.autopilot = 0
to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Launch sequence initiated!"))
if(usr)
@@ -85,8 +85,8 @@
if (!can_force(user)) return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
if (GLOB.emergency_shuttle.autopilot)
GLOB.emergency_shuttle.autopilot = 0
to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!"))
if(usr)
@@ -99,8 +99,8 @@
if (!can_cancel(user)) return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
if (GLOB.emergency_shuttle.autopilot)
GLOB.emergency_shuttle.autopilot = 0
to_chat(world, span_boldnotice("Alert: The shuttle autopilot has been overridden. Launch sequence aborted!"))
if(usr)
-2
View File
@@ -1,5 +1,3 @@
var/list/spells = typesof(/spell) //needed for the badmin verb for now
/spell
var/name = "Spell"
var/desc = "A spell"
+2 -2
View File
@@ -25,7 +25,7 @@
/datum/tgui_module/alarm_monitor/engineering
/datum/tgui_module/alarm_monitor/engineering/New()
..()
alarm_handlers = list(atmosphere_alarm, fire_alarm, power_alarm)
alarm_handlers = list(GLOB.atmosphere_alarm, GLOB.fire_alarm, GLOB.power_alarm)
// Subtype for glasses_state
/datum/tgui_module/alarm_monitor/engineering/glasses
@@ -44,7 +44,7 @@
/datum/tgui_module/alarm_monitor/security
/datum/tgui_module/alarm_monitor/security/New()
..()
alarm_handlers = list(camera_alarm, motion_alarm)
alarm_handlers = list(GLOB.camera_alarm, GLOB.motion_alarm)
// Subtype for glasses_state
/datum/tgui_module/alarm_monitor/security/glasses
+20 -20
View File
@@ -145,12 +145,12 @@
data["msg_cooldown"] = message_cooldown ? (round((message_cooldown - world.time) / 10)) : 0
data["cc_cooldown"] = centcomm_message_cooldown ? (round((centcomm_message_cooldown - world.time) / 10)) : 0
data["esc_callable"] = emergency_shuttle.location() && !emergency_shuttle.online() ? TRUE : FALSE
data["esc_recallable"] = emergency_shuttle.location() && emergency_shuttle.online() ? TRUE : FALSE
data["esc_callable"] = GLOB.emergency_shuttle.location() && !GLOB.emergency_shuttle.online() ? TRUE : FALSE
data["esc_recallable"] = GLOB.emergency_shuttle.location() && GLOB.emergency_shuttle.online() ? TRUE : FALSE
data["esc_status"] = FALSE
if(emergency_shuttle.has_eta())
var/timeleft = emergency_shuttle.estimate_arrival_time()
data["esc_status"] = emergency_shuttle.online() ? "ETA:" : "RECALLING:"
if(GLOB.emergency_shuttle.has_eta())
var/timeleft = GLOB.emergency_shuttle.estimate_arrival_time()
data["esc_status"] = GLOB.emergency_shuttle.online() ? "ETA:" : "RECALLING:"
data["esc_status"] += " [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
return data
@@ -272,7 +272,7 @@
return
call_shuttle_proc(ui.user)
if(emergency_shuttle.online())
if(GLOB.emergency_shuttle.online())
post_status(src, "shuttle", user = ui.user)
setMenuState(ui.user, COMM_SCREEN_MAIN)
@@ -381,7 +381,7 @@
PS.allowedtocall = !(PS.allowedtocall)
/proc/call_shuttle_proc(var/mob/user)
if ((!( SSticker ) || !emergency_shuttle.location()))
if ((!( SSticker ) || !GLOB.emergency_shuttle.location()))
return
if(!GLOB.universe.OnShuttleCall(user))
@@ -392,7 +392,7 @@
to_chat(user, "[using_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.")
return
if(emergency_shuttle.deny_shuttle)
if(GLOB.emergency_shuttle.deny_shuttle)
to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.")
return
@@ -400,11 +400,11 @@
to_chat(user, "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again.")
return
if(emergency_shuttle.going_to_centcom())
if(GLOB.emergency_shuttle.going_to_centcom())
to_chat(user, "The emergency shuttle may not be called while returning to [using_map.boss_short].")
return
if(emergency_shuttle.online())
if(GLOB.emergency_shuttle.online())
to_chat(user, "The emergency shuttle is already on its way.")
return
@@ -412,7 +412,7 @@
to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.")
return
emergency_shuttle.call_evac()
GLOB.emergency_shuttle.call_evac()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
admin_chat_message(message = "Emergency evac beginning! Called by [key_name(user)]!", color = "#CC2222") //VOREStation Add
@@ -420,20 +420,20 @@
return
/proc/init_shift_change(var/mob/user, var/force = 0)
if ((!( SSticker ) || !emergency_shuttle.location()))
if ((!( SSticker ) || !GLOB.emergency_shuttle.location()))
return
if(emergency_shuttle.going_to_centcom())
if(GLOB.emergency_shuttle.going_to_centcom())
to_chat(user, "The shuttle may not be called while returning to [using_map.boss_short].")
return
if(emergency_shuttle.online())
if(GLOB.emergency_shuttle.online())
to_chat(user, "The shuttle is already on its way.")
return
// if force is 0, some things may stop the shuttle call
if(!force)
if(emergency_shuttle.deny_shuttle)
if(GLOB.emergency_shuttle.deny_shuttle)
to_chat(user, "[using_map.boss_short] does not currently have a shuttle available in your sector. Please try again later.")
return
@@ -447,13 +447,13 @@
if(SSticker.mode.auto_recall_shuttle)
//New version pretends to call the shuttle but cause the shuttle to return after a random duration.
emergency_shuttle.auto_recall = 1
GLOB.emergency_shuttle.auto_recall = 1
if(SSticker.mode.name == "blob" || SSticker.mode.name == "epidemic")
to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.")
return
emergency_shuttle.call_transfer()
GLOB.emergency_shuttle.call_transfer()
//delay events in case of an autotransfer
if (isnull(user))
@@ -467,13 +467,13 @@
return
/proc/cancel_call_proc(var/mob/user)
if (!( SSticker ) || !emergency_shuttle.can_recall())
if (!( SSticker ) || !GLOB.emergency_shuttle.can_recall())
return
if((SSticker.mode.name == "blob")||(SSticker.mode.name == "Meteor"))
return
if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to CentCom
emergency_shuttle.recall()
if(!GLOB.emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to CentCom
GLOB.emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
return
+3 -3
View File
@@ -62,10 +62,10 @@
data["name"] = name
data["duration"] = roundduration2text()
if(emergency_shuttle?.going_to_centcom())
if(GLOB.emergency_shuttle?.going_to_centcom())
data["evac"] = "Gone"
else if(emergency_shuttle?.online())
if(emergency_shuttle.evac)
else if(GLOB.emergency_shuttle?.online())
if(GLOB.emergency_shuttle.evac)
data["evac"] = "Emergency"
else
data["evac"] = "Crew Transfer"
+2 -3
View File
@@ -5,9 +5,8 @@
/datum/unit_test/materials_shall_have_names/Run()
var/list/failures = list()
populate_material_list()
for(var/name in global.name_to_material)
var/datum/material/mat = global.name_to_material[name]
for(var/name, value in GLOB.name_to_material)
var/datum/material/mat = value
if(!mat)
continue // how did we get here?
if(!mat.display_name || !mat.use_name || !mat.sheet_singular_name || !mat.sheet_plural_name || !mat.sheet_collective_name)
+3 -8
View File
@@ -1,8 +1,3 @@
var/list/ventcrawl_machinery = list(
/obj/machinery/atmospherics/unary/vent_pump,
/obj/machinery/atmospherics/unary/vent_scrubber
)
/mob/living/var/list/icon/pipes_shown = list()
/mob/living/var/last_played_vent
/mob/living/var/is_ventcrawling = FALSE
@@ -126,7 +121,7 @@ var/list/ventcrawl_machinery = list(
return ..()
/mob/living/AltClickOn(var/atom/A)
if(is_type_in_list(A,ventcrawl_machinery))
if(is_type_in_list(A, GLOB.ventcrawl_machinery))
handle_ventcrawl(A)
return 1
return ..()
@@ -135,7 +130,7 @@ var/list/ventcrawl_machinery = list(
var/atom/pipe
var/list/pipes = list()
for(var/obj/machinery/atmospherics/unary/U in range(1))
if(is_type_in_list(U,ventcrawl_machinery) && Adjacent(U) && !U.welded)
if(is_type_in_list(U, GLOB.ventcrawl_machinery) && Adjacent(U) && !U.welded)
pipes |= U
if(!pipes || !pipes.len)
to_chat(src, "There are no pipes that you can ventcrawl into within range!")
@@ -164,7 +159,7 @@ var/list/ventcrawl_machinery = list(
if(!vent_found)
for(var/obj/machinery/atmospherics/machine in range(1,src))
if(is_type_in_list(machine, ventcrawl_machinery))
if(is_type_in_list(machine, GLOB.ventcrawl_machinery))
vent_found = machine
if(!vent_found || !vent_found.can_crawl_through())
@@ -32,7 +32,7 @@
/obj/machinery/atmospherics/proc/ventcrawl_to(var/mob/living/user, var/obj/machinery/atmospherics/target_move, var/direction)
if(target_move)
if(is_type_in_list(target_move, ventcrawl_machinery) && target_move.can_crawl_through())
if(is_type_in_list(target_move, GLOB.ventcrawl_machinery) && target_move.can_crawl_through())
user.remove_ventcrawl()
user.forceMove(target_move.loc) //handles entering and so on
user.visible_message("You hear something squeezing through the ducts.", "You climb out the ventilation system.")
@@ -56,7 +56,7 @@
T.runechat_message(message)
else
if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
if((direction & initialize_directions) || is_type_in_list(src, GLOB.ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
user.remove_ventcrawl()
user.forceMove(src.loc)
SEND_SIGNAL(user,COMSIG_MOB_VENTCRAWL_END,src)
+2 -2
View File
@@ -924,7 +924,7 @@
)
if(O.material in rock_munch)
nom = rock_munch[O.material]
M = name_to_material[O.material]
M = GLOB.name_to_material[O.material]
else if(istype(O, /obj/item/ore/slag))
nom = list("nutrition" = 15, "remark" = "You taste dusty, crunchy mistakes. This is a travesty... but at least it is an edible one.", "WTF" = FALSE)
else //Random rock.
@@ -965,7 +965,7 @@
var/obj/item/stack/material/stack = O.split(1) //A little off the top.
I = stack
nom = refined_taste[O.default_type]
M = name_to_material[O.default_type]
M = GLOB.name_to_material[O.default_type]
else if(istype(I, /obj/item/entrepreneur/crystal))
nom = list("nutrition" = 100, "remark" = "The crytal was particularly brittle and not difficult to break apart, but the inside was incredibly flavoursome. Though devoid of any actual healing power, it seems to be very nutritious!", "WTF" = FALSE)