More globals (#19111)

This commit is contained in:
Kashargul
2026-01-30 19:51:21 +01:00
committed by GitHub
parent 48e8d0df0b
commit d0678d4046
73 changed files with 258 additions and 248 deletions
+4 -9
View File
@@ -702,9 +702,6 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
log_admin("Announce: [key_name(usr)] : [message]")
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//VOREStation Edit to this verb for the purpose of making it compliant with the annunciator system
var/datum/announcement/priority/admin_pri_announcer = new
var/datum/announcement/minor/admin_min_announcer = new
/datum/admins/proc/intercom()
set category = "Fun.Event Kit"
set name = "Intercom Msg"
@@ -722,13 +719,11 @@ var/datum/announcement/minor/admin_min_announcer = new
var/msgverb = tgui_input_text(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says")
if(message) //They put a message
message = sanitize(message, 500, extra = 0)
//VOREStation Edit Start
if(msgverb)
msgverb = sanitize(msgverb, 50, extra = 0)
else
msgverb = "states"
GLOB.global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
//VOREStation Edit End
log_admin("Intercom: [key_name(usr)] : [sender]:[message]")
feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -817,7 +812,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/this_sender = decomposed[i]
var/this_message = decomposed[++i]
var/this_wait = decomposed[++i]
GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. //VOREStation Edit
GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
sleep(this_wait SECONDS)
/datum/admins/proc/toggleooc()
@@ -1479,7 +1474,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Debug.Game"
set name = "Set Telecrystals"
set desc = "Allows admins to change telecrystals of a user."
set popup_menu = FALSE //VOREStation Edit - Declutter.
set popup_menu = FALSE
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
@@ -1495,7 +1490,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Debug.Game"
set name = "Add Telecrystals"
set desc = "Allows admins to change telecrystals of a user by addition."
set popup_menu = FALSE //VOREStation Edit - Declutter.
set popup_menu = FALSE
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
@@ -1616,7 +1611,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set popup_menu = FALSE
if(check_rights(R_ADMIN|R_DEBUG))
traitors.spawn_uplink(H)
GLOB.traitors.spawn_uplink(H)
H.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT
H.mind.accept_tcrystals = 1
var/msg = "[key_name(usr)] has given [H.ckey] an uplink."
+3 -3
View File
@@ -474,7 +474,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
set category = "Admin.Game"
if(check_rights(R_HOLDER))
var/list/jobs = list()
for (var/datum/job/J in job_master.occupations)
for (var/datum/job/J in GLOB.job_master.occupations)
if (J.current_positions >= J.total_positions && J.total_positions != -1)
jobs += J.title
if (!jobs.len)
@@ -482,7 +482,7 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
return
var/job = tgui_input_list(usr, "Please select job slot to free", "Free job slot", jobs)
if (job)
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
message_admins("A job slot for [job] has been opened by [key_name_admin(usr)]")
return
@@ -757,4 +757,4 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic
to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
ADMIN_VERB(modify_shift_end, (R_ADMIN|R_EVENT|R_SERVER), "Modify Shift End", "Modifies the hard shift end time.", "Server.Game")
transfer_controller.modify_hard_end(user)
GLOB.transfer_controller.modify_hard_end(user)
+22 -22
View File
@@ -255,7 +255,7 @@
if(!M.ckey) //sanity
to_chat(usr, span_filter_adminlog("This mob has no ckey"))
return
if(!job_master)
if(!GLOB.job_master)
to_chat(usr, span_filter_adminlog("Job Master has not been setup!"))
return
@@ -276,7 +276,7 @@
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -296,7 +296,7 @@
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -316,7 +316,7 @@
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -336,7 +336,7 @@
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=cargodept;jobban4=\ref[M]'>Cargo Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -356,7 +356,7 @@
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -376,7 +376,7 @@
jobs += "<tr bgcolor='e79fff'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -396,7 +396,7 @@
jobs += "<tr bgcolor='ebb8fc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_PLANET))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=explorationdept;jobban4=\ref[M]'>Exploration Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_PLANET))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -420,7 +420,7 @@
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'>"
for(var/jobPos in offmap_jobs)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -440,7 +440,7 @@
jobs += "<tr bgcolor='dddddd'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -465,7 +465,7 @@
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))]'><a href='byond://?src=\ref[src];[HrefToken()];jobban3=nonhumandept;jobban4=\ref[M]'>Synthetic Positions</a></th></tr><tr align='center'>"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = GLOB.job_master.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -545,7 +545,7 @@
tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!")
return
if(!job_master)
if(!GLOB.job_master)
to_chat(usr, span_filter_adminlog("Job Master has not been setup!"))
return
@@ -555,63 +555,63 @@
if("commanddept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("securitydept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("engineeringdept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("cargodept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("medicaldept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("sciencedept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("explorationdept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_PLANET))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("offmapdept")
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)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("civiliandept")
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("nonhumandept")
joblist += "pAI"
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = GLOB.job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
else
+1 -1
View File
@@ -2,7 +2,7 @@
set category = "Debug.Investigate"
set name = "Show Air Report"
if(!master_controller || !SSair)
if(!GLOB.master_controller || !SSair)
tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report")
return
+1 -1
View File
@@ -69,7 +69,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
set category = "Mapping"
set name = "Camera Report"
if(!master_controller)
if(!GLOB.master_controller)
tgui_alert_async(usr,"Master_controller not found.","Sec Camera Report")
return 0
+4 -4
View File
@@ -572,10 +572,10 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
//If desired, apply equipment.
if(equipment)
if(charjob)
job_master.EquipRank(new_character, charjob, 1)
GLOB.job_master.EquipRank(new_character, charjob, 1)
if(new_character.mind)
new_character.mind.assigned_role = charjob
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
new_character.mind.role_alt_title = GLOB.job_master.GetPlayerAltTitle(new_character, charjob)
//If customised job title, modify here.
if(custom_job && custom_job_title)
@@ -733,8 +733,8 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if (!check_rights_for(src, R_HOLDER))
return
if(job_master)
for(var/datum/job/job in job_master.occupations)
if(GLOB.job_master)
for(var/datum/job/job in GLOB.job_master.occupations)
to_chat(src, "[job.title]: [job.total_positions]")
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+2 -2
View File
@@ -392,10 +392,10 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before
var/choice = tgui_alert(holder, "How do you wish for Nar-Sie to interact with its surroundings?","NarChoice",list("CultStation13", "Nar-Singulo"))
if(choice == "CultStation13")
log_and_message_admins("has set narsie's behaviour to \"CultStation13\".", holder)
narsie_behaviour = choice
GLOB.narsie_behaviour = choice
if(choice == "Nar-Singulo")
log_and_message_admins("has set narsie's behaviour to \"Nar-Singulo\".", holder)
narsie_behaviour = choice
GLOB.narsie_behaviour = choice
if("remove_all_clothing")
for(var/obj/item/clothing/O in world)
+2 -2
View File
@@ -6,8 +6,8 @@
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
return
if(job_master && SSticker)
var/datum/job/job = job_master.GetJob(JOB_AI)
if(GLOB.job_master && SSticker)
var/datum/job/job = GLOB.job_master.GetJob(JOB_AI)
if(!job)
to_chat(usr, "Unable to locate the AI job")
return
@@ -56,10 +56,10 @@
//VOREStation Add End
if(!(pref.player_alt_titles)) pref.player_alt_titles = new()
if(!job_master)
if(!GLOB.job_master)
return
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
var/alt_title = pref.player_alt_titles[job.title]
if(alt_title && !(alt_title in job.alt_titles))
pref.player_alt_titles -= job.title
@@ -173,7 +173,7 @@
if("job_info")
var/rank = params["rank"]
var/datum/job/job = job_master.GetJob(rank)
var/datum/job/job = GLOB.job_master.GetJob(rank)
if(!istype(job))
return TOPIC_NOACTION
@@ -225,7 +225,7 @@
pref.player_alt_titles[job.title] = new_title
/datum/category_item/player_setup_item/occupation/proc/SetJob(mob/user, role, level)
var/datum/job/job = job_master.GetJob(role)
var/datum/job/job = GLOB.job_master.GetJob(role)
if(!job)
return 0
+1 -1
View File
@@ -57,7 +57,7 @@
..()
if(enables_planes)
user.recalculate_vis()
if(("[slot]" in slot_flags_enumeration) && (slot_flags & slot_flags_enumeration["[slot]"]))
if(("[slot]" in GLOB.slot_flags_enumeration) && (slot_flags & GLOB.slot_flags_enumeration["[slot]"]))
for(var/trait in clothing_traits)
ADD_CLOTHING_TRAIT(user, trait)
@@ -37,7 +37,7 @@
var/wave_lower_bound = 4 // Min amount.
/datum/event2/event/meteor_defense/proc/set_meteor_types()
meteor_types = meteors_threatening.Copy()
meteor_types = GLOB.meteors_threatening.Copy()
/datum/event2/event/meteor_defense/set_up()
direction = pick(GLOB.cardinal) // GLOB.alldirs doesn't work with current meteor code unfortunately.
+1 -1
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(prevent_respawns)
//Job slot cleanup
var/job = src.mind.assigned_role
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
//Their objectives cleanup
if(src.mind.objectives.len)
+2 -2
View File
@@ -575,7 +575,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(check_rights_for(src.client, R_ADMIN|R_FUN|R_EVENT))
return 0
return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists))
return (T && T.holy) && (is_manifest || (mind in GLOB.cult.current_antagonists))
/mob/observer/dead/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost.Game"
@@ -687,7 +687,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/ghosts_can_write
if(SSticker.mode.name == "cult")
if(cult.current_antagonists.len > CONFIG_GET(number/cult_ghostwriter_req_cultists))
if(GLOB.cult.current_antagonists.len > CONFIG_GET(number/cult_ghostwriter_req_cultists))
ghosts_can_write = 1
if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such.
+1 -1
View File
@@ -18,7 +18,7 @@
return seen_turfs_in_range(src, 3)
/mob/living/carbon/human/seen_cult_turfs()
if(mind in cult.current_antagonists)
if(mind in GLOB.cult.current_antagonists)
return seen_turfs_in_range(src, world.view)
return ..()
@@ -36,10 +36,10 @@
/datum/antagonist/add_antagonist(var/datum/mind/player)
. = ..()
if(src == cult)
if(src == GLOB.cult)
cultnet.updateVisibility(player.current, 0)
/datum/antagonist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted)
..()
if(src == cult)
if(src == GLOB.cult)
cultnet.updateVisibility(player.current, 0)
+1 -1
View File
@@ -223,7 +223,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
ooc_notes_style = read_preference(/datum/preference/toggle/living/ooc_notes_style)
private_notes = client.prefs.read_preference(/datum/preference/text/living/private_notes)
if (malf && !(mind in malf.current_antagonists))
if (GLOB.malf && !(mind in GLOB.malf.current_antagonists))
show_laws()
to_chat(src, span_filter_notice(span_bold("These laws may be changed by other players, or by you being the traitor.")))
@@ -221,7 +221,7 @@
return
if (syndicate)
for(var/datum/mind/tra in traitors.current_antagonists)
for(var/datum/mind/tra in GLOB.traitors.current_antagonists)
if(tra.current)
// TODO: Update to new antagonist system.
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
@@ -231,7 +231,7 @@
// TODO: Update to new antagonist system.
if(!mind.special_role)
mind.special_role = "traitor"
traitors.current_antagonists |= mind
GLOB.traitors.current_antagonists |= mind
update_cell()
+3 -3
View File
@@ -381,10 +381,10 @@
/mob/living/silicon/proc/is_traitor()
return mind && (mind in traitors.current_antagonists)
return mind && (mind in GLOB.traitors.current_antagonists)
/mob/living/silicon/proc/is_malf()
return mind && (mind in malf.current_antagonists)
return mind && (mind in GLOB.malf.current_antagonists)
/mob/living/silicon/proc/is_malf_or_traitor()
return is_traitor() || is_malf()
@@ -407,7 +407,7 @@
//Handle job slot/tater cleanup.
var/job = mind.assigned_role
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
if(mind.objectives.len)
qdel(mind.objectives)
+1 -1
View File
@@ -471,7 +471,7 @@
//Job slot cleanup
var/job = mind.assigned_role
job_master.FreeRole(job)
GLOB.job_master.FreeRole(job)
//Their objectives cleanup
if(mind.objectives.len)
+4 -4
View File
@@ -202,7 +202,7 @@
return timer - world.time
/mob/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
var/datum/job/job = GLOB.job_master.GetJob(rank)
if(!job)
return 0
if(!job.is_position_available())
@@ -237,7 +237,7 @@
return 0
//Find our spawning point.
var/list/join_props = job_master.LateSpawn(client, rank)
var/list/join_props = GLOB.job_master.LateSpawn(client, rank)
if(!join_props)
return
@@ -276,10 +276,10 @@
qdel(src)
return
job_master.AssignRole(src, rank, 1)
GLOB.job_master.AssignRole(src, rank, 1)
var/mob/living/character = create_character(T) //creates the human and transfers vars and mind
character = job_master.EquipRank(character, rank, 1) //equips the human
character = GLOB.job_master.EquipRank(character, rank, 1) //equips the human
UpdateFactionList(character)
var/datum/job/J = SSjob.get_job(rank)
@@ -192,11 +192,11 @@
var/datum/job/previewJob
// Determine what job is marked as 'High' priority, and dress them up as such.
if(job_civilian_low & ASSISTANT)
previewJob = job_master.GetJob(JOB_ALT_VISITOR)
previewJob = GLOB.job_master.GetJob(JOB_ALT_VISITOR)
else if(client && ispAI(client.mob))
pass() //Don't do anything!
else
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
var/job_flag
switch(job.department_flag)
if(CIVILIAN)
@@ -257,9 +257,9 @@
var/datum/job/highJob
// Determine what job is marked as 'High' priority, and dress them up as such.
if(job_civilian_low & ASSISTANT)
highJob = job_master.GetJob(JOB_ALT_ASSISTANT)
highJob = GLOB.job_master.GetJob(JOB_ALT_ASSISTANT)
else
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
var/job_flag
switch(job.department_flag)
if(CIVILIAN)
@@ -132,7 +132,7 @@
// Sets how much energy is drained to make each bullet
/obj/item/ammo_magazine/smart/proc/set_production_cost(var/obj/item/ammo_casing/A)
var/list/matters = ammo_repository.get_materials_from_object(A)
var/list/matters = GLOB.ammo_repository.get_materials_from_object(A)
var/tempcost
for(var/key in matters)
var/value = matters[key]
+4 -4
View File
@@ -411,8 +411,8 @@
/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(ishuman(M)) // Any location
if(M.mind && cult.is_antagonist(M.mind) && prob(10))
cult.remove_antagonist(M.mind)
if(M.mind && GLOB.cult.is_antagonist(M.mind) && prob(10))
GLOB.cult.remove_antagonist(M.mind)
if(prob(2)) //Get an ACTUAL chaplain for your stuff
if(M.has_modifier_of_type(/datum/modifier/redspace_corruption))
M.remove_modifiers_of_type(/datum/modifier/redspace_corruption)
@@ -431,8 +431,8 @@
/datum/reagent/water/holywater/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(ishuman(M)) // Any location
if(M.mind && cult.is_antagonist(M.mind) && prob(5))
cult.remove_antagonist(M.mind)
if(M.mind && GLOB.cult.is_antagonist(M.mind) && prob(5))
GLOB.cult.remove_antagonist(M.mind)
if(prob(1)) //injecting holy water makes it weaker because that's sinful
if(M.has_modifier_of_type(/datum/modifier/redspace_corruption))
M.remove_modifiers_of_type(/datum/modifier/redspace_corruption)
+2 -2
View File
@@ -208,9 +208,9 @@ GLOBAL_LIST_EMPTY(active_autoresleevers)
//If desired, apply equipment.
if(equip_body)
if(charjob)
job_master.EquipRank(new_character, charjob, 1)
GLOB.job_master.EquipRank(new_character, charjob, 1)
new_character.mind.assigned_role = charjob
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
new_character.mind.role_alt_title = GLOB.job_master.GetPlayerAltTitle(new_character, charjob)
//A redraw for good measure
new_character.regenerate_icons()
+14 -14
View File
@@ -8,8 +8,8 @@ GLOBAL_VAR_INIT(security_level, 0)
//6 = code delta
//config.alert_desc_blue_downto
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/effects/alert_levels/alert_raise.ogg'))
/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1)
GLOBAL_DATUM_INIT(security_announcement_up, /datum/announcement/priority/security, new(do_log = 0, do_newscast = 1, new_sound = sound('sound/effects/alert_levels/alert_raise.ogg')))
GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/security, new(do_log = 0, do_newscast = 1))
/proc/set_security_level(var/level)
switch(level)
@@ -32,40 +32,40 @@ GLOBAL_VAR_INIT(security_level, 0)
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level)
switch(level)
if(SEC_LEVEL_GREEN)
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_green)]", "Attention! Alert level lowered to code green.")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_green)]", "Attention! Alert level lowered to code green.")
GLOB.security_level = SEC_LEVEL_GREEN
if(SEC_LEVEL_YELLOW)
if(GLOB.security_level < SEC_LEVEL_YELLOW)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_yellow_upto)]", "Attention! Alert level elevated to yellow")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_yellow_upto)]", "Attention! Alert level elevated to yellow")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_yellow_downto)]", "Attention! Alert level lowered to yellow")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_yellow_downto)]", "Attention! Alert level lowered to yellow")
GLOB.security_level = SEC_LEVEL_YELLOW
if(SEC_LEVEL_VIOLET)
if(GLOB.security_level < SEC_LEVEL_VIOLET)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_violet_upto)]", "Attention! Alert level elevated to violet")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_violet_upto)]", "Attention! Alert level elevated to violet")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_violet_downto)]", "Attention! Alert level lowered to violet")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_violet_downto)]", "Attention! Alert level lowered to violet")
GLOB.security_level = SEC_LEVEL_VIOLET
if(SEC_LEVEL_ORANGE)
if(GLOB.security_level < SEC_LEVEL_ORANGE)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_orange_upto)]", "Attention! Alert level elevated to orange")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_orange_upto)]", "Attention! Alert level elevated to orange")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_orange_downto)]", "Attention! Alert level lowered to orange")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_orange_downto)]", "Attention! Alert level lowered to orange")
GLOB.security_level = SEC_LEVEL_ORANGE
if(SEC_LEVEL_BLUE)
if(GLOB.security_level < SEC_LEVEL_BLUE)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_blue_upto)]", "Attention! Alert level elevated to blue")
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_blue_upto)]", "Attention! Alert level elevated to blue")
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_blue_downto)]", "Attention! Alert level lowered to blue")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_blue_downto)]", "Attention! Alert level lowered to blue")
GLOB.security_level = SEC_LEVEL_BLUE
if(SEC_LEVEL_RED)
if(GLOB.security_level < SEC_LEVEL_RED)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_red_upto)]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_red_upto)]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
else
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_red_downto)]", "Attention! Code red!")
GLOB.security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_red_downto)]", "Attention! Code red!")
GLOB.security_level = SEC_LEVEL_RED
if(SEC_LEVEL_DELTA)
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_delta)]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
GLOB.security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_delta)]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
GLOB.security_level = SEC_LEVEL_DELTA
var/newlevel = get_security_level()
+2 -2
View File
@@ -408,7 +408,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations)
if(action == "help")
var/list/whitelist_jobs = list()
for(var/datum/job/our_job in job_master.occupations)
for(var/datum/job/our_job in GLOB.job_master.occupations)
if(our_job.whitelist_only)
whitelist_jobs += our_job.title
message.text = "The following jobs and species have a whitelist:\nJobs: [english_list(whitelist_jobs)]\nSpecies: [english_list(GLOB.whitelisted_species)]"
@@ -450,7 +450,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations)
switch(action)
if("add")
if(kind == "job")
var/datum/job/job = job_master.GetJob(role)
var/datum/job/job = GLOB.job_master.GetJob(role)
if(!job)
message.text = "Error, invalid job entered. Check spelling and capitalization."
return message
+1 -1
View File
@@ -74,7 +74,7 @@
var/list/jobs = list()
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in GLOB.job_master.occupations)
if(job && user.IsJobAvailable(job.title))
// Check for jobs with minimum age requirements
if(!character_old_enough_for_job(user.client.prefs, job))