mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
[MIRROR] Fixes some more issues with job configs not being loaded by ResetOccupation [MDB IGNORE] (#23936)
* Fixes some more issues with job configs not being loaded by ResetOccupation (#78596) ## About The Pull Request Job configs would get reset by ResetOccupation and not loaded afterwards. This fixes that. ## Why It's Good For The Game Bugfix ## Changelog 🆑 fix: Fixed job configs not being loaded properly. /🆑 --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Fixes some more issues with job configs not being loaded by ResetOccupation --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
return returnable_list
|
return returnable_list
|
||||||
|
|
||||||
/// Sets all of the job datum configurable values to what they've been set to in the config file, jobconfig.toml.
|
/// Sets all of the job datum configurable values to what they've been set to in the config file, jobconfig.toml.
|
||||||
/datum/controller/subsystem/job/proc/load_jobs_from_config()
|
/datum/controller/subsystem/job/proc/load_jobs_from_config(silent = FALSE)
|
||||||
if(!length(job_config_datum_singletons))
|
if(!length(job_config_datum_singletons))
|
||||||
stack_trace("SSjob tried to load jobs from config, but the config singletons were not initialized! Likely tried to load jobs before SSjob was initialized.")
|
stack_trace("SSjob tried to load jobs from config, but the config singletons were not initialized! Likely tried to load jobs before SSjob was initialized.")
|
||||||
return
|
return
|
||||||
@@ -25,7 +25,8 @@
|
|||||||
var/job_key = occupation.config_tag
|
var/job_key = occupation.config_tag
|
||||||
if(!job_config[job_key]) // Job isn't listed, skip it.
|
if(!job_config[job_key]) // Job isn't listed, skip it.
|
||||||
// List both job_title and job_key in case they de-sync over time.
|
// List both job_title and job_key in case they de-sync over time.
|
||||||
message_admins(span_notice("[occupation.title] (with config key [job_key]) is missing from jobconfig.toml! Using codebase defaults."))
|
if(!silent)
|
||||||
|
message_admins(span_notice("[occupation.title] (with config key [job_key]) is missing from jobconfig.toml! Using codebase defaults."))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for(var/config_datum_key in job_config_datum_singletons)
|
for(var/config_datum_key in job_config_datum_singletons)
|
||||||
|
|||||||
@@ -305,8 +305,10 @@ SUBSYSTEM_DEF(job)
|
|||||||
player.mind.special_role = null
|
player.mind.special_role = null
|
||||||
SetupOccupations()
|
SetupOccupations()
|
||||||
unassigned = list()
|
unassigned = list()
|
||||||
if(overflow_role)
|
if(CONFIG_GET(flag/load_jobs_from_txt))
|
||||||
set_overflow_role(overflow_role)
|
// Any errors with the configs has already been said, we don't need to repeat them here.
|
||||||
|
load_jobs_from_config(silent = TRUE)
|
||||||
|
set_overflow_role(overflow_role)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user