mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-14 08:35:39 +01:00
Conversion many Globals to Managed Globals (Part 1) (#17121)
* Conversion of some Globals to Managed Globals * Fix * for later --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -308,8 +308,8 @@
|
||||
for(var/j in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans.
|
||||
for(var/antag_type in all_antag_types) // Grab other bans.
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
for(var/antag_type in GLOB.all_antag_types) // Grab other bans.
|
||||
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
|
||||
bantypes |= antag.bantype
|
||||
for(var/j in bantypes)
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/floorIsLava = 0
|
||||
GLOBAL_VAR_INIT(floorIsLava, 0)
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
@@ -1420,12 +1420,12 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
to_chat(usr, "Mode has not started.")
|
||||
return
|
||||
|
||||
var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", all_antag_types)
|
||||
if(!antag_type || !all_antag_types[antag_type])
|
||||
var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", GLOB.all_antag_types)
|
||||
if(!antag_type || !GLOB.all_antag_types[antag_type])
|
||||
to_chat(usr, "Aborting.")
|
||||
return
|
||||
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
|
||||
message_admins("[key_name(usr)] attempting to force latespawn with template [antag.id].")
|
||||
antag.attempt_late_spawn()
|
||||
|
||||
@@ -1502,8 +1502,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Send Fax"
|
||||
set desc = "Sends a fax to this machine"
|
||||
var/department = tgui_input_list(usr, "Choose a fax", "Fax", alldepartments)
|
||||
for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes)
|
||||
var/department = tgui_input_list(usr, "Choose a fax", "Fax", GLOB.alldepartments)
|
||||
for(var/obj/machinery/photocopier/faxmachine/sendto in GLOB.allfaxes)
|
||||
if(sendto.department == department)
|
||||
|
||||
if (!istype(src,/datum/admins))
|
||||
@@ -1561,7 +1561,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
var/obj/item/rcvdcopy
|
||||
rcvdcopy = destination.copy(P)
|
||||
rcvdcopy.loc = null //hopefully this shouldn't cause trouble
|
||||
adminfaxes += rcvdcopy
|
||||
GLOB.adminfaxes += rcvdcopy
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -634,12 +634,12 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(security_printer_tickets.len >= 1)
|
||||
var/input = tgui_input_list(usr, "Which message?", "Security Tickets", security_printer_tickets)
|
||||
if(GLOB.security_printer_tickets.len >= 1)
|
||||
var/input = tgui_input_list(usr, "Which message?", "Security Tickets", GLOB.security_printer_tickets)
|
||||
if(!input)
|
||||
return
|
||||
if(tgui_alert(usr, "Do you want to remove the following message from the global list? \"[input]\"", "Remove Ticket", list("Yes", "No")) == "Yes")
|
||||
security_printer_tickets -= input
|
||||
GLOB.security_printer_tickets -= input
|
||||
log_and_message_admins("removed a security ticket from the global list: \"[input]\"", usr)
|
||||
|
||||
else
|
||||
|
||||
@@ -412,8 +412,8 @@
|
||||
|
||||
dat += "<a href='byond://?src=\ref[src];[HrefToken()];delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
|
||||
dat += "<hr>"
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/A = all_antag_types[antag_type]
|
||||
for(var/antag_type in GLOB.all_antag_types)
|
||||
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
|
||||
dat += A.get_check_antag_output(src)
|
||||
dat += "</body></html>"
|
||||
usr << browse(dat, "window=roundstatus;size=400x500")
|
||||
|
||||
@@ -485,7 +485,7 @@
|
||||
counter = 0
|
||||
// Needs to be done early because it uses the length of the list for sizing
|
||||
var/list/offmap_jobs = list()
|
||||
for(var/dept in offmap_departments)
|
||||
for(var/dept in GLOB.offmap_departments)
|
||||
offmap_jobs += SSjob.get_job_titles_in_department(dept)
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='00ffff'><th colspan='[length(offmap_jobs)]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=offmapdept;jobban4=\ref[M]'>Offmap Positions</a></th></tr><tr align='center'>"
|
||||
@@ -555,11 +555,11 @@
|
||||
counter = 0
|
||||
var/isbanned_dept = jobban_isbanned(M, JOB_SYNDICATE)
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ffeeaa'><th colspan='[length(all_antag_types)]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=Syndicate;jobban4=\ref[M]'>Antagonist Positions</a></th></tr><tr align='center'>"
|
||||
jobs += "<tr bgcolor='ffeeaa'><th colspan='[length(GLOB.all_antag_types)]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=Syndicate;jobban4=\ref[M]'>Antagonist Positions</a></th></tr><tr align='center'>"
|
||||
|
||||
// Antagonists.
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
for(var/antag_type in GLOB.all_antag_types)
|
||||
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
|
||||
if(!antag || !antag.bantype)
|
||||
continue
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("offmapdept")
|
||||
for(var/dept in offmap_departments)
|
||||
for(var/dept in GLOB.offmap_departments)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(dept))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(!H.client)
|
||||
to_chat(usr, span_filter_warning(" Only mobs with clients can alter their own appearance."))
|
||||
return
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()]
|
||||
switch(tgui_alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
||||
if("Yes")
|
||||
log_and_message_admins("has allowed [H] to change [T.his] appearance, without whitelisting of races.")
|
||||
|
||||
@@ -1089,7 +1089,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
else if(issilicon(M))
|
||||
if(isAI(M))
|
||||
var/mob/living/silicon/ai/ai = M
|
||||
empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(ai.loc)
|
||||
GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(ai.loc)
|
||||
global_announcer.autosay("[ai] has been moved to intelligence storage.", "Artificial Intelligence Oversight")
|
||||
ai.clear_client()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user