Finishes overflow roles (#37053)

This commit is contained in:
KorPhaeron
2018-04-09 05:10:10 -05:00
committed by CitadelStationBot
parent 120457d8fd
commit 46b7b95897
5 changed files with 25 additions and 15 deletions
@@ -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
+13
View File
@@ -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()