mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 22:42:26 +01:00
Turn more unmanaged global vars into GLOB (#20446)
Turned a ton of unmanaged globals into managed globals. Refactored some UT output. Removed some unused things, including vars. Added a test to ensure people don't keep adding new unmanaged vars.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
|
||||
var/global/BSACooldown = 0
|
||||
var/global/floorIsLava = 0
|
||||
var/global/enabled_spooking = 0
|
||||
|
||||
////////////////////////////////
|
||||
@@ -109,7 +108,7 @@ var/global/enabled_spooking = 0
|
||||
body += "<table width = '100%'>"
|
||||
for(var/psi_rank in list(PSI_RANK_SENSITIVE, PSI_RANK_HARMONIOUS, PSI_RANK_APEX, PSI_RANK_LIMITLESS))
|
||||
var/owner_rank = psyker.psi ? psyker.psi.get_rank() : 0
|
||||
var/psi_title = psychic_ranks_to_strings[psi_rank]
|
||||
var/psi_title = GLOB.psychic_ranks_to_strings[psi_rank]
|
||||
if(psi_rank == owner_rank)
|
||||
psi_title = "<b>[psi_title]</b>"
|
||||
if(psi_rank != PSI_RANK_LIMITLESS)
|
||||
@@ -612,9 +611,9 @@ var/global/enabled_spooking = 0
|
||||
var/dat = "<B>Job Bans!</B><HR>"
|
||||
dat += "<a href='?src=[REF(src)];jobban_search=1'>Search via ckey</a><br>"
|
||||
dat += "<table>"
|
||||
for (var/ckey in jobban_keylist)
|
||||
for (var/job in jobban_keylist[ckey])
|
||||
var/list/ban = jobban_keylist[ckey][job]
|
||||
for (var/ckey in GLOB.jobban_keylist)
|
||||
for (var/job in GLOB.jobban_keylist[ckey])
|
||||
var/list/ban = GLOB.jobban_keylist[ckey][job]
|
||||
if (!jobban_isexpired(ban, null, job, ckey))
|
||||
dat += "<tr><td>[ckey] - [ban[2]] - (<a href='?src=[REF(src)];jobban_tgt=[ckey];jobban_job=[job];'>unban</a>)</td></tr>"
|
||||
|
||||
@@ -987,11 +986,11 @@ var/global/enabled_spooking = 0
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in custom_items
|
||||
if(!owner|| !custom_items[owner])
|
||||
var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in GLOB.custom_items
|
||||
if(!owner|| !GLOB.custom_items[owner])
|
||||
return
|
||||
|
||||
var/list/possible_items = custom_items[owner]
|
||||
var/list/possible_items = GLOB.custom_items[owner]
|
||||
var/datum/custom_item/item_to_spawn = input("Select an item to spawn.", "Spawn Custom Item") as null|anything in possible_items
|
||||
if(!item_to_spawn)
|
||||
return
|
||||
@@ -1368,7 +1367,7 @@ var/global/enabled_spooking = 0
|
||||
var/list/sounds = file2list('sound/serversound_list.txt');
|
||||
sounds += "--CANCEL--"
|
||||
sounds += "--LOCAL--"
|
||||
sounds += sounds_cache
|
||||
sounds += GLOB.sounds_cache
|
||||
|
||||
var/melody = tgui_input_list(usr, "Select a sound from the server to play.", "Sound Selection", sounds)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
||||
var/list/admin_verbs_default = list(
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_default, list(
|
||||
/datum/admins/proc/show_player_panel, //shows an interface for individual players, with various links (links require additional flags),
|
||||
/client/proc/player_panel_modern,
|
||||
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
||||
@@ -8,8 +9,9 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
|
||||
/client/proc/cmd_mentor_check_new_players,
|
||||
/client/proc/notification_add /*allows everyone to set up player notifications*/
|
||||
)
|
||||
var/list/admin_verbs_admin = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
|
||||
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
|
||||
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage */
|
||||
@@ -103,19 +105,22 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/toggle_aooc,
|
||||
/client/proc/force_away_mission,
|
||||
/client/proc/alooc
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_ban, list(
|
||||
/client/proc/unban_panel,
|
||||
/client/proc/jobbans,
|
||||
/client/proc/warning_panel,
|
||||
/client/proc/stickybanpanel
|
||||
)
|
||||
var/list/admin_verbs_sounds = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_sounds, list(
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/play_server_sound
|
||||
)
|
||||
var/list/admin_verbs_fun = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_fun, list(
|
||||
/client/proc/object_talk,
|
||||
/client/proc/cmd_admin_dress,
|
||||
/client/proc/cmd_admin_grab_observers,
|
||||
@@ -139,9 +144,9 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/apply_sunstate,
|
||||
/datum/admins/proc/ccannoucment,
|
||||
/datum/admins/proc/set_odyssey
|
||||
)
|
||||
))
|
||||
|
||||
var/list/admin_verbs_spawn = list(
|
||||
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
|
||||
/client/proc/game_panel,
|
||||
/datum/admins/proc/spawn_fruit,
|
||||
/datum/admins/proc/spawn_custom_item,
|
||||
@@ -149,8 +154,9 @@ var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, // allows us to spawn instances,
|
||||
/client/proc/respawn_character,
|
||||
/client/proc/spawn_chemdisp_cartridge
|
||||
)
|
||||
var/list/admin_verbs_server = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/datum/admins/proc/capture_map_part,
|
||||
/client/proc/Set_Holiday,
|
||||
/datum/admins/proc/startnow,
|
||||
@@ -175,8 +181,9 @@ var/list/admin_verbs_server = list(
|
||||
/client/proc/configure_access_control,
|
||||
/datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub
|
||||
/client/proc/force_away_mission
|
||||
)
|
||||
var/list/admin_verbs_debug = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/getruntimelog, // allows us to access runtime logs to somebody,
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/Debug2,
|
||||
@@ -237,27 +244,31 @@ var/list/admin_verbs_debug = list(
|
||||
/datum/admins/proc/force_initialize_weather,
|
||||
/datum/admins/proc/force_weather_state,
|
||||
/datum/admins/proc/force_kill_weather
|
||||
)
|
||||
))
|
||||
|
||||
var/list/admin_verbs_paranoid_debug = list(
|
||||
GLOBAL_LIST_INIT(admin_verbs_paranoid_debug, list(
|
||||
/client/proc/callproc,
|
||||
/client/proc/callproc_target,
|
||||
/client/proc/debug_controller
|
||||
)
|
||||
))
|
||||
|
||||
var/list/admin_verbs_possess = list(
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_possess, list(
|
||||
/proc/possess,
|
||||
/proc/release
|
||||
)
|
||||
var/list/admin_verbs_permissions = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_permissions, list(
|
||||
/client/proc/edit_admin_permissions
|
||||
)
|
||||
var/list/admin_verbs_rejuv = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_rejuv, list(
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
//verbs which can be hidden
|
||||
var/list/admin_verbs_hideable = list(
|
||||
GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
/client/proc/allow_character_respawn,
|
||||
/client/proc/toggle_view_range,
|
||||
/client/proc/stealth,
|
||||
@@ -414,8 +425,9 @@ var/list/admin_verbs_hideable = list(
|
||||
/proc/release,
|
||||
/client/proc/force_away_mission,
|
||||
/client/proc/profiler_start,
|
||||
)
|
||||
var/list/admin_verbs_mod = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_mod, list(
|
||||
/client/proc/cmd_admin_pm_context, // right-click adminPM interface,
|
||||
/client/proc/cmd_admin_pm_panel, // admin-pm list,
|
||||
/client/proc/debug_variables, // allows us to -see- the variables of any instance in the game.,
|
||||
@@ -439,9 +451,10 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/toggle_aooc,
|
||||
/client/proc/alooc,
|
||||
/client/proc/allow_character_respawn
|
||||
)
|
||||
))
|
||||
|
||||
var/list/admin_verbs_dev = list( //will need to be altered - Ryan784
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_dev, list( //will need to be altered - Ryan784
|
||||
///datum/admins/proc/restart,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
|
||||
@@ -486,8 +499,9 @@ var/list/admin_verbs_dev = list( //will need to be altered - Ryan784
|
||||
/client/proc/cmd_generate_lag,
|
||||
/client/proc/create_poll, //Allows to create polls
|
||||
/client/proc/profiler_start,
|
||||
)
|
||||
var/list/admin_verbs_cciaa = list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_cciaa, list(
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/cmd_cciaa_say,
|
||||
@@ -498,54 +512,55 @@ var/list/admin_verbs_cciaa = list(
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/odyssey_panel,
|
||||
/client/proc/toggle_aooc
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
/client/proc/add_admin_verbs()
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
if(holder)
|
||||
add_verb(src, admin_verbs_default)
|
||||
add_verb(src, GLOB.admin_verbs_default)
|
||||
if(holder.rights & R_BUILDMODE) add_verb(src, /client/proc/togglebuildmodeself)
|
||||
if(holder.rights & R_ADMIN) add_verb(src, admin_verbs_admin)
|
||||
if(holder.rights & R_BAN) add_verb(src, admin_verbs_ban)
|
||||
if(holder.rights & R_FUN) add_verb(src, admin_verbs_fun)
|
||||
if(holder.rights & R_SERVER) add_verb(src, admin_verbs_server)
|
||||
if(holder.rights & R_ADMIN) add_verb(src, GLOB.admin_verbs_admin)
|
||||
if(holder.rights & R_BAN) add_verb(src, GLOB.admin_verbs_ban)
|
||||
if(holder.rights & R_FUN) add_verb(src, GLOB.admin_verbs_fun)
|
||||
if(holder.rights & R_SERVER) add_verb(src, GLOB.admin_verbs_server)
|
||||
if(holder.rights & R_DEBUG)
|
||||
add_verb(src, admin_verbs_debug)
|
||||
add_verb(src, GLOB.admin_verbs_debug)
|
||||
if(GLOB.config.debugparanoid && !(holder.rights & R_ADMIN))
|
||||
remove_verb(src, admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
|
||||
if(holder.rights & R_POSSESS) add_verb(src, admin_verbs_possess)
|
||||
if(holder.rights & R_PERMISSIONS) add_verb(src, admin_verbs_permissions)
|
||||
remove_verb(src, GLOB.admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
|
||||
if(holder.rights & R_POSSESS) add_verb(src, GLOB.admin_verbs_possess)
|
||||
if(holder.rights & R_PERMISSIONS) add_verb(src, GLOB.admin_verbs_permissions)
|
||||
if(holder.rights & R_STEALTH) add_verb(src, /client/proc/stealth)
|
||||
if(holder.rights & R_REJUVINATE) add_verb(src, admin_verbs_rejuv)
|
||||
if(holder.rights & R_SPAWN) add_verb(src, admin_verbs_spawn)
|
||||
if(holder.rights & R_SOUNDS) add_verb(src, admin_verbs_sounds)
|
||||
if(holder.rights & R_MOD) add_verb(src, admin_verbs_mod)
|
||||
if(holder.rights & R_DEV) add_verb(src, admin_verbs_dev)
|
||||
if(holder.rights & R_CCIAA) add_verb(src, admin_verbs_cciaa)
|
||||
if(holder.rights & R_REJUVINATE) add_verb(src, GLOB.admin_verbs_rejuv)
|
||||
if(holder.rights & R_SPAWN) add_verb(src, GLOB.admin_verbs_spawn)
|
||||
if(holder.rights & R_SOUNDS) add_verb(src, GLOB.admin_verbs_sounds)
|
||||
if(holder.rights & R_MOD) add_verb(src, GLOB.admin_verbs_mod)
|
||||
if(holder.rights & R_DEV) add_verb(src, GLOB.admin_verbs_dev)
|
||||
if(holder.rights & R_CCIAA) add_verb(src, GLOB.admin_verbs_cciaa)
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
remove_verb(src, admin_verbs_default)
|
||||
remove_verb(src, GLOB.admin_verbs_default)
|
||||
remove_verb(src, /client/proc/togglebuildmodeself)
|
||||
remove_verb(src, admin_verbs_admin)
|
||||
remove_verb(src, admin_verbs_ban)
|
||||
remove_verb(src, admin_verbs_fun)
|
||||
remove_verb(src, admin_verbs_server)
|
||||
remove_verb(src, admin_verbs_debug)
|
||||
remove_verb(src, admin_verbs_possess)
|
||||
remove_verb(src, admin_verbs_permissions)
|
||||
remove_verb(src, GLOB.admin_verbs_admin)
|
||||
remove_verb(src, GLOB.admin_verbs_ban)
|
||||
remove_verb(src, GLOB.admin_verbs_fun)
|
||||
remove_verb(src, GLOB.admin_verbs_server)
|
||||
remove_verb(src, GLOB.admin_verbs_debug)
|
||||
remove_verb(src, GLOB.admin_verbs_possess)
|
||||
remove_verb(src, GLOB.admin_verbs_permissions)
|
||||
remove_verb(src, /client/proc/stealth)
|
||||
remove_verb(src, admin_verbs_rejuv)
|
||||
remove_verb(src, admin_verbs_sounds)
|
||||
remove_verb(src, admin_verbs_spawn)
|
||||
remove_verb(src, debug_verbs)
|
||||
remove_verb(src, GLOB.admin_verbs_rejuv)
|
||||
remove_verb(src, GLOB.admin_verbs_sounds)
|
||||
remove_verb(src, GLOB.admin_verbs_spawn)
|
||||
remove_verb(src, GLOB.debug_verbs)
|
||||
add_aooc_if_necessary()
|
||||
|
||||
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
|
||||
set name = "Adminverbs - Hide Most"
|
||||
set category = "Admin"
|
||||
|
||||
remove_verb(src, admin_verbs_hideable)
|
||||
remove_verb(src, GLOB.admin_verbs_hideable)
|
||||
add_verb(src, /client/proc/show_verbs)
|
||||
|
||||
to_chat(src, "<span class='interface'>Most of your adminverbs have been hidden.</span>")
|
||||
@@ -1104,7 +1119,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
set category = "Fun"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
var/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
|
||||
var/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in GLOB.spells
|
||||
if(!S) return
|
||||
T.add_spell(new S)
|
||||
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -1138,7 +1153,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
if (!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/ai/target = tgui_input_list(usr, "Choose the AI to force-wipe.", "AI Termination", ai_list)
|
||||
var/mob/living/silicon/ai/target = tgui_input_list(usr, "Choose the AI to force-wipe.", "AI Termination", GLOB.ai_list)
|
||||
|
||||
if (!target || alert("Are you sure you want to wipe [target.name]? They will be ghosted and their job slot freed.", "Confirm AI Termination", "No", "No", "Yes") != "Yes")
|
||||
return
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
tgt = CKM.ckey; \
|
||||
}
|
||||
|
||||
var/list/jobban_keylist = list() // Global jobban list.
|
||||
GLOBAL_LIST_INIT(jobban_keylist, list())
|
||||
GLOBAL_PROTECT(jobban_keylist)
|
||||
|
||||
/*
|
||||
* Expected format:
|
||||
@@ -70,11 +71,11 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
return
|
||||
|
||||
// Create a new record if the client isn't logged already.
|
||||
if (!jobban_keylist[key])
|
||||
jobban_keylist[key] = list()
|
||||
if (!GLOB.jobban_keylist[key])
|
||||
GLOB.jobban_keylist[key] = list()
|
||||
|
||||
// Sanity catch. This shouldn't happen, but better safe than sorry.
|
||||
if (jobban_keylist[key][rank] && !jobban_isexpired(jobban_keylist[key][rank], player, rank))
|
||||
if (GLOB.jobban_keylist[key][rank] && !jobban_isexpired(GLOB.jobban_keylist[key][rank], player, rank))
|
||||
log_and_message_admins("Attempted to apply a jobban to [key] while they already have an active ban. Job: [rank].")
|
||||
return
|
||||
|
||||
@@ -84,7 +85,7 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
unban_time = world.realtime + (minutes MINUTES)
|
||||
|
||||
// Create the entry.
|
||||
jobban_keylist[key][rank] = list(reason, unban_time)
|
||||
GLOB.jobban_keylist[key][rank] = list(reason, unban_time)
|
||||
|
||||
// Log the ban to the appropriate place.
|
||||
if (GLOB.config.ban_legacy_system)
|
||||
@@ -137,7 +138,7 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
antag_ban = TRUE
|
||||
|
||||
// Get the user's ckey.
|
||||
var/list/entry = jobban_keylist[ckey]
|
||||
var/list/entry = GLOB.jobban_keylist[ckey]
|
||||
|
||||
// If this is false, then we have no entry. As such, they have no active
|
||||
// bans!
|
||||
@@ -165,11 +166,11 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
*/
|
||||
/proc/jobban_loadbanfile()
|
||||
var/savefile/S = new("data/job_full.ban")
|
||||
S["bans"] >> jobban_keylist
|
||||
S["bans"] >> GLOB.jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
|
||||
if (!jobban_keylist)
|
||||
jobban_keylist = list()
|
||||
if (!GLOB.jobban_keylist)
|
||||
GLOB.jobban_keylist = list()
|
||||
log_admin("jobban_keylist was empty")
|
||||
|
||||
/**
|
||||
@@ -195,14 +196,14 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
var/job = query.item[3]
|
||||
var/reason = query.item[4]
|
||||
|
||||
if (!jobban_keylist[ckey])
|
||||
jobban_keylist[ckey] = list()
|
||||
if (!GLOB.jobban_keylist[ckey])
|
||||
GLOB.jobban_keylist[ckey] = list()
|
||||
|
||||
if (!jobban_keylist[ckey][job])
|
||||
if (!GLOB.jobban_keylist[ckey][job])
|
||||
// Insert it with 0 time because the expiration of a temp jobban for
|
||||
// MySQL is dependent on the database and query itself. So we can just
|
||||
// politely not care.
|
||||
jobban_keylist[ckey][job] = list(reason, -1)
|
||||
GLOB.jobban_keylist[ckey][job] = list(reason, -1)
|
||||
else
|
||||
// Woups. What happened here...?
|
||||
log_and_message_admins("JOBBANS: Duplicate jobban entry in MySQL for [ckey]. Ban ID: #[query.item[1]]")
|
||||
@@ -212,7 +213,7 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
*/
|
||||
/proc/jobban_savebanfile()
|
||||
var/savefile/S = new("data/job_full.ban")
|
||||
S["bans"] << jobban_keylist
|
||||
S["bans"] << GLOB.jobban_keylist
|
||||
|
||||
/**
|
||||
* Removes a jobban entry from the code and calls the config appropriate
|
||||
@@ -234,7 +235,7 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
return
|
||||
|
||||
// Check for a player record.
|
||||
var/list/entry = jobban_keylist[ckey]
|
||||
var/list/entry = GLOB.jobban_keylist[ckey]
|
||||
if (entry)
|
||||
// Find the specific ban.
|
||||
var/list/ban = entry[rank]
|
||||
@@ -245,8 +246,8 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
|
||||
// If the entry is now empty, remove the entire ckey from the list.
|
||||
if (!entry.len)
|
||||
jobban_keylist[ckey] = null
|
||||
jobban_keylist -= ckey
|
||||
GLOB.jobban_keylist[ckey] = null
|
||||
GLOB.jobban_keylist -= ckey
|
||||
|
||||
// Update appropriate ban files.
|
||||
if (GLOB.config.ban_legacy_system)
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
var/list/data = list()
|
||||
data["gamemode"] = SSticker.mode.name
|
||||
data["round_duration"] = get_round_duration_formatted()
|
||||
data["evacuation_is_idle"] = evacuation_controller.is_idle()
|
||||
data["time_left"] = evacuation_controller.get_eta()
|
||||
data["waiting_to_leave"] = evacuation_controller.waiting_to_leave()
|
||||
data["evacuation_is_idle"] = GLOB.evacuation_controller.is_idle()
|
||||
data["time_left"] = GLOB.evacuation_controller.get_eta()
|
||||
data["waiting_to_leave"] = GLOB.evacuation_controller.waiting_to_leave()
|
||||
data["round_delayed"] = SSticker.delay_end
|
||||
data["antagonists"] = list()
|
||||
data["antagonist_types"] = list()
|
||||
@@ -89,7 +89,7 @@
|
||||
data["antagonist_types"] |= A.role_text_plural
|
||||
if(A.flags & ANTAG_HAS_NUKE)
|
||||
data["nuke_disks"] = list()
|
||||
for(var/obj/item/disk/nuclear/N in nuke_disks)
|
||||
for(var/obj/item/disk/nuclear/N in GLOB.nuke_disks)
|
||||
var/turf/T = get_turf(N)
|
||||
var/location_name
|
||||
if(ismob(N.loc))
|
||||
@@ -120,16 +120,16 @@
|
||||
return
|
||||
switch(params["call_shuttle"])
|
||||
if("1")
|
||||
if (evacuation_controller.call_evacuation(usr, TRUE))
|
||||
if (GLOB.evacuation_controller.call_evacuation(usr, TRUE))
|
||||
log_admin("[key_name(usr)] called an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
||||
. = TRUE
|
||||
|
||||
if("2")
|
||||
if (evacuation_controller.call_evacuation(usr, TRUE))
|
||||
if (GLOB.evacuation_controller.call_evacuation(usr, TRUE))
|
||||
log_admin("[key_name(usr)] called an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
||||
else if (evacuation_controller.cancel_evacuation())
|
||||
else if (GLOB.evacuation_controller.cancel_evacuation())
|
||||
log_admin("[key_name(usr)] cancelled an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] cancelled an evacuation.", 1)
|
||||
. = TRUE
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/choice = input(user, "How do you wish for Nar-Sie to interact with its surroundings?") as null|anything in list("CultStation13", "Nar-Singulo")
|
||||
if(choice == "CultStation13")
|
||||
log_and_message_admins("has set narsie's behaviour to \"CultStation13\".", user)
|
||||
narsie_behaviour = choice
|
||||
GLOB.narsie_behaviour = choice
|
||||
if(choice == "Nar-Singulo")
|
||||
log_and_message_admins("has set narsie's behaviour to \"Nar-Singulo\".", user)
|
||||
narsie_behaviour = choice
|
||||
GLOB.narsie_behaviour = choice
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
/datum/admin_secret_item/random_event/trigger_cordical_borer_infestation/execute(var/mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return borers.attempt_random_spawn()
|
||||
return GLOB.borers.attempt_random_spawn()
|
||||
|
||||
@@ -116,15 +116,15 @@
|
||||
|
||||
switch(href_list["call_shuttle"])
|
||||
if("1")
|
||||
if (evacuation_controller.call_evacuation(usr, TRUE))
|
||||
if (GLOB.evacuation_controller.call_evacuation(usr, TRUE))
|
||||
log_admin("[key_name(usr)] called an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
||||
|
||||
if("2")
|
||||
if (evacuation_controller.call_evacuation(usr, TRUE))
|
||||
if (GLOB.evacuation_controller.call_evacuation(usr, TRUE))
|
||||
log_admin("[key_name(usr)] called an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
||||
else if (evacuation_controller.cancel_evacuation())
|
||||
else if (GLOB.evacuation_controller.cancel_evacuation())
|
||||
log_admin("[key_name(usr)] cancelled an evacuation.")
|
||||
message_admins("[key_name_admin(usr)] cancelled an evacuation.", 1)
|
||||
|
||||
@@ -1007,7 +1007,7 @@
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["faxMachine"])
|
||||
department = fax.department
|
||||
else
|
||||
department = input("Choose the target department.", "Target Department", null) in alldepartments
|
||||
department = input("Choose the target department.", "Target Department", null) in GLOB.alldepartments
|
||||
|
||||
create_admin_fax(department)
|
||||
|
||||
@@ -1304,7 +1304,7 @@
|
||||
WANTED.backup_author = src.admincaster_signature //Submitted by
|
||||
WANTED.is_admin_message = 1
|
||||
SSnews.wanted_issue = WANTED
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.newsAlert()
|
||||
NEWSCASTER.update_icon()
|
||||
src.admincaster_screen = 15
|
||||
@@ -1320,7 +1320,7 @@
|
||||
var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
SSnews.wanted_issue = null
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.update_icon()
|
||||
src.admincaster_screen=17
|
||||
src.access_news_network()
|
||||
@@ -1458,11 +1458,11 @@
|
||||
else if(href_list["vsc"])
|
||||
if(check_rights(R_ADMIN|R_SERVER))
|
||||
if(href_list["vsc"] == "airflow")
|
||||
vsc.ChangeSettingsDialog(usr,vsc.settings)
|
||||
GLOB.vsc.ChangeSettingsDialog(usr, GLOB.vsc.settings)
|
||||
if(href_list["vsc"] == GAS_PHORON)
|
||||
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
|
||||
GLOB.vsc.ChangeSettingsDialog(usr, GLOB.vsc.plc.settings)
|
||||
if(href_list["vsc"] == "default")
|
||||
vsc.SetDefault(usr)
|
||||
GLOB.vsc.SetDefault(usr)
|
||||
|
||||
else if(href_list["toglang"])
|
||||
if(check_rights(R_SPAWN))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
|
||||
var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as")
|
||||
GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","monkey","alien","as"))
|
||||
|
||||
/proc/generate_ahelp_key_words(var/mob/mob, var/msg)
|
||||
var/list/surnames = list()
|
||||
@@ -38,7 +38,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
for(var/original_word in msglist)
|
||||
var/word = ckey(original_word)
|
||||
if(word)
|
||||
if(!(word in adminhelp_ignored_words))
|
||||
if(!(word in GLOB.adminhelp_ignored_words))
|
||||
if(word == "ai" && !ai_found)
|
||||
ai_found = 1
|
||||
msg += "<b>[original_word] <A HREF='?_src_=holder;adminchecklaws=[REF(mob)]'>(CL)</A></b> "
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
set category = "Debug"
|
||||
|
||||
to_chat(usr, "<b>Jobbans active in this round.</b>")
|
||||
for(var/t in jobban_keylist)
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
to_chat(usr, "[t]")
|
||||
|
||||
/client/proc/print_jobban_old_filter()
|
||||
@@ -176,6 +176,6 @@
|
||||
return
|
||||
|
||||
to_chat(usr, "<b>Jobbans active in this round.</b>")
|
||||
for(var/t in jobban_keylist)
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
if(findtext(t, filter))
|
||||
to_chat(usr, "[t]")
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
//- Identify how hard it is to break into the area and where the weak points are
|
||||
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
|
||||
|
||||
var/camera_range_display_status = 0
|
||||
var/intercom_range_display_status = 0
|
||||
GLOBAL_VAR_INIT(camera_range_display_status, 0)
|
||||
GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
|
||||
/obj/effect/debugging/camera_range
|
||||
icon = 'icons/480x480.dmi'
|
||||
@@ -45,17 +45,17 @@ var/intercom_range_display_status = 0
|
||||
set category = "Mapping"
|
||||
set name = "Camera Range Display"
|
||||
|
||||
if(camera_range_display_status)
|
||||
camera_range_display_status = 0
|
||||
if(GLOB.camera_range_display_status)
|
||||
GLOB.camera_range_display_status = 0
|
||||
else
|
||||
camera_range_display_status = 1
|
||||
GLOB.camera_range_display_status = 1
|
||||
|
||||
|
||||
|
||||
for(var/obj/effect/debugging/camera_range/C in world)
|
||||
qdel(C)
|
||||
|
||||
if(camera_range_display_status)
|
||||
if(GLOB.camera_range_display_status)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
new/obj/effect/debugging/camera_range(C.loc)
|
||||
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -108,15 +108,15 @@ var/intercom_range_display_status = 0
|
||||
set category = "Mapping"
|
||||
set name = "Intercom Range Display"
|
||||
|
||||
if(intercom_range_display_status)
|
||||
intercom_range_display_status = 0
|
||||
if(GLOB.intercom_range_display_status)
|
||||
GLOB.intercom_range_display_status = 0
|
||||
else
|
||||
intercom_range_display_status = 1
|
||||
GLOB.intercom_range_display_status = 1
|
||||
|
||||
for(var/obj/effect/debugging/marker/M in world)
|
||||
qdel(M)
|
||||
|
||||
if(intercom_range_display_status)
|
||||
if(GLOB.intercom_range_display_status)
|
||||
for(var/obj/item/device/radio/intercom/I in world)
|
||||
for(var/turf/T in orange(7,I))
|
||||
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
|
||||
@@ -124,7 +124,7 @@ var/intercom_range_display_status = 0
|
||||
qdel(F)
|
||||
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
var/list/debug_verbs = list (
|
||||
GLOBAL_LIST_INIT(debug_verbs, list(
|
||||
/client/proc/do_not_use_these
|
||||
,/client/proc/camera_view
|
||||
,/client/proc/sec_camera_report
|
||||
@@ -165,7 +165,7 @@ var/list/debug_verbs = list (
|
||||
,/client/proc/get_bad_fdoors
|
||||
,/client/proc/get_bad_doors
|
||||
,/client/proc/analyze_openturf
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
/client/proc/enable_debug_verbs()
|
||||
@@ -174,7 +174,7 @@ var/list/debug_verbs = list (
|
||||
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
add_verb(src, debug_verbs)
|
||||
add_verb(src, GLOB.debug_verbs)
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -184,7 +184,7 @@ var/list/debug_verbs = list (
|
||||
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
remove_verb(src, debug_verbs)
|
||||
remove_verb(src, GLOB.debug_verbs)
|
||||
|
||||
init_verbs()
|
||||
feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -332,7 +332,7 @@ var/list/debug_verbs = list (
|
||||
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
var/global/prevent_airgroup_regroup = 0
|
||||
// var/global/prevent_airgroup_regroup = 0
|
||||
|
||||
/client/proc/break_all_air_groups()
|
||||
set category = "Mapping"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/sounds_cache = list()
|
||||
GLOBAL_LIST_INIT_TYPED(sounds_cache, /sound, list())
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Fun"
|
||||
@@ -8,7 +8,7 @@ var/list/sounds_cache = list()
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
sounds_cache += S
|
||||
GLOB.sounds_cache += S
|
||||
|
||||
if(alert("Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
|
||||
return
|
||||
@@ -39,7 +39,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
var/list/sounds = file2list('sound/serversound_list.txt');
|
||||
sounds += "--CANCEL--"
|
||||
sounds += sounds_cache
|
||||
sounds += GLOB.sounds_cache
|
||||
|
||||
var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ Ccomp's first proc.
|
||||
if (G.client)
|
||||
P = G.client.prefs
|
||||
else if (G.ckey)
|
||||
P = preferences_datums[G.ckey]
|
||||
P = GLOB.preferences_datums[G.ckey]
|
||||
else
|
||||
to_chat(src, "Something went wrong, couldn't find the target's preferences datum")
|
||||
return 0
|
||||
@@ -433,9 +433,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(!new_character.real_name)
|
||||
if(new_character.gender == MALE)
|
||||
new_character.real_name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
new_character.real_name = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
|
||||
else
|
||||
new_character.real_name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
new_character.real_name = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
|
||||
new_character.name = new_character.real_name
|
||||
|
||||
if(G_found.mind && !G_found.mind.active)
|
||||
@@ -882,7 +882,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Admin"
|
||||
set name = "Call Evacuation"
|
||||
|
||||
if ((!( ROUND_IS_STARTED ) || !evacuation_controller))
|
||||
if ((!( ROUND_IS_STARTED ) || !GLOB.evacuation_controller))
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -907,7 +907,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
var/choice = input("Is this an emergency evacuation, bluespace jump, or a crew transfer?") in list(TRANSFER_EMERGENCY, TRANSFER_CREW, TRANSFER_JUMP)
|
||||
evacuation_controller.call_evacuation(usr, choice)
|
||||
GLOB.evacuation_controller.call_evacuation(usr, choice)
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -923,7 +923,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
|
||||
|
||||
if(!ROUND_IS_STARTED || !evacuation_controller)
|
||||
if(!ROUND_IS_STARTED || !GLOB.evacuation_controller)
|
||||
return
|
||||
|
||||
if(SSatlas.current_map.shuttle_call_restarts)
|
||||
@@ -939,7 +939,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
|
||||
evacuation_controller.cancel_evacuation()
|
||||
GLOB.evacuation_controller.cancel_evacuation()
|
||||
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-cancelled the evacuation.")
|
||||
message_admins(SPAN_NOTICE("[key_name_admin(usr)] admin-cancelled the evacuation."), 1)
|
||||
@@ -956,10 +956,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
evacuation_controller.deny = !evacuation_controller.deny
|
||||
GLOB.evacuation_controller.deny = !GLOB.evacuation_controller.deny
|
||||
|
||||
log_admin("[key_name(src)] has [evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.")
|
||||
message_admins("[key_name_admin(usr)] has [evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.")
|
||||
log_admin("[key_name(src)] has [GLOB.evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.")
|
||||
message_admins("[key_name_admin(usr)] has [GLOB.evacuation_controller.deny ? "denied" : "allowed"] the evacuation to be called.")
|
||||
|
||||
/client/proc/cmd_admin_attack_log(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/datum/preferences/D
|
||||
var/client/C = GLOB.directory[warned_ckey]
|
||||
if(C) D = C.prefs
|
||||
else D = preferences_datums[warned_ckey]
|
||||
else D = GLOB.preferences_datums[warned_ckey]
|
||||
|
||||
if(!D)
|
||||
to_chat(src, SPAN_WARNING("Error: warn_legacy(): No such ckey found."))
|
||||
|
||||
Reference in New Issue
Block a user