From 783d199215e27b2328be47252e560bddb4e8dc6d Mon Sep 17 00:00:00 2001 From: Dimach Date: Wed, 6 Dec 2023 17:48:49 +0200 Subject: [PATCH] bugfix: reset occupations after game mod probing (#4006) --- code/controllers/subsystem/jobs.dm | 5 ++--- code/controllers/subsystem/ticker.dm | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 4cec07a0762..ebb2d2d8387 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -221,10 +221,9 @@ SUBSYSTEM_DEF(jobs) if(player?.mind) player.mind.assigned_role = null player.mind.special_role = null - SetupOccupations() + for(var/datum/job/job in occupations) + job.current_positions = initial(job.current_positions) unassigned = list() - return - ///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check /datum/controller/subsystem/jobs/proc/FillHeadPosition() diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index c883f801dd6..3189e5af671 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -203,6 +203,7 @@ SUBSYSTEM_DEF(ticker) var/datum/game_mode/M = config.pick_mode(GLOB.secret_force_mode) if(M.can_start()) mode = config.pick_mode(GLOB.secret_force_mode) + SSjobs.ResetOccupations() if(!mode) mode = pickweight(runnable_modes) if(mode)