Merge pull request #6321 from Citadel-Station-13/upstream-merge-37053
[MIRROR] Fixes overflow role latejoin
This commit is contained in:
@@ -224,10 +224,13 @@
|
||||
/datum/config_entry/keyed_number_list/law_weight
|
||||
splitter = ","
|
||||
|
||||
/datum/config_entry/number/assistant_cap
|
||||
/datum/config_entry/number/overflow_cap
|
||||
config_entry_value = -1
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/string/overflow_job
|
||||
config_entry_value = "Assistant"
|
||||
|
||||
/datum/config_entry/flag/starlight
|
||||
/datum/config_entry/flag/grey_assistants
|
||||
|
||||
|
||||
@@ -21,8 +21,21 @@ SUBSYSTEM_DEF(job)
|
||||
if(CONFIG_GET(flag/load_jobs_from_txt))
|
||||
LoadJobs()
|
||||
generate_selectable_species()
|
||||
set_overflow_role(CONFIG_GET(string/overflow_job))
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/job/proc/set_overflow_role(new_overflow_role)
|
||||
var/datum/job/new_overflow = GetJob(new_overflow_role)
|
||||
var/cap = CONFIG_GET(number/overflow_cap)
|
||||
|
||||
new_overflow.spawn_positions = cap
|
||||
new_overflow.total_positions = cap
|
||||
|
||||
if(new_overflow_role != overflow_role)
|
||||
var/datum/job/old_overflow = GetJob(overflow_role)
|
||||
old_overflow.spawn_positions = initial(old_overflow.spawn_positions)
|
||||
old_overflow.total_positions = initial(old_overflow.total_positions)
|
||||
overflow_role = new_overflow_role
|
||||
|
||||
/datum/controller/subsystem/job/proc/SetupOccupations(faction = "Station")
|
||||
occupations = list()
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
begin_month = APRIL
|
||||
|
||||
/datum/holiday/april_fools/celebrate()
|
||||
SSjob.overflow_role = "Clown"
|
||||
SSjob.set_overflow_role("Clown")
|
||||
SSticker.login_music = 'sound/ambience/clown.ogg'
|
||||
for(var/mob/dead/new_player/P in GLOB.mob_list)
|
||||
if(P.client)
|
||||
|
||||
@@ -6,8 +6,8 @@ Assistant
|
||||
flag = ASSISTANT
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = -1
|
||||
spawn_positions = -1
|
||||
total_positions = 5
|
||||
spawn_positions = 5
|
||||
supervisors = "absolutely everyone"
|
||||
selection_color = "#dddddd"
|
||||
access = list() //See /datum/job/assistant/get_access()
|
||||
@@ -23,15 +23,6 @@ Assistant
|
||||
else
|
||||
return ..()
|
||||
|
||||
/datum/job/assistant/config_check()
|
||||
var/ac = CONFIG_GET(number/assistant_cap)
|
||||
if(ac != 0)
|
||||
total_positions = ac
|
||||
spawn_positions = ac
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/datum/outfit/job/assistant
|
||||
name = "Assistant"
|
||||
jobtype = /datum/job/assistant
|
||||
|
||||
Reference in New Issue
Block a user