diff --git a/code/controllers/subsystem/dynamic/dynamic.dm b/code/controllers/subsystem/dynamic/dynamic.dm index 5fdd93b1ae0c25..ed0ebec7aeae9a 100644 --- a/code/controllers/subsystem/dynamic/dynamic.dm +++ b/code/controllers/subsystem/dynamic/dynamic.dm @@ -530,6 +530,8 @@ SUBSYSTEM_DEF(dynamic) //To new_player and such, and we want the datums to just free when the roundstart work is done var/list/roundstart_rules = init_rulesets(/datum/dynamic_ruleset/roundstart) + var/security = 0 // BANDASTATION EDIT - Force players to play Sec + SSjob.DivideOccupations(pure = TRUE, allow_all = TRUE) for(var/i in GLOB.new_player_list) var/mob/dead/new_player/player = i @@ -545,12 +547,26 @@ SUBSYSTEM_DEF(dynamic) else roundstart_pop_ready++ candidates.Add(player) + // BANDASTATION EDIT START - Force players to play Sec + if(player.mind?.assigned_role?.departments_list?.Find(/datum/job_department/security)) + security++ + // BANDASTATION EDIT END SSjob.ResetOccupations() log_dynamic("Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.") if (candidates.len <= 0) log_dynamic("[candidates.len] candidates.") return TRUE + // BANDASTATION EDIT START - Force players to play Sec + if(security < CONFIG_GET(number/roundstart_security_for_threat)) + var/roundstart_budget_low_sec = security / CONFIG_GET(number/roundstart_security_for_threat) * round_start_budget + var/transfer_to_midround = round_start_budget - roundstart_budget_low_sec + mid_round_budget += transfer_to_midround + round_start_budget = roundstart_budget_low_sec + initial_round_start_budget = roundstart_budget_low_sec + log_dynamic("Not enough security; forcing roundstart budget to [roundstart_budget_low_sec]") + // BANDASTATION EDIT END + if(GLOB.dynamic_forced_roundstart_ruleset.len > 0) rigged_roundstart() else diff --git a/config/bandastation/bandastation_config.txt b/config/bandastation/bandastation_config.txt index de1681f429ba11..2925f6c37cb001 100644 --- a/config/bandastation/bandastation_config.txt +++ b/config/bandastation/bandastation_config.txt @@ -5,3 +5,8 @@ #TTS_API_URL_SILERO #WHITELIST220 + +## A minimum amount of security required on roundstart +## If there is less security than this value, a percent of roundstart threat will be pushed to midround +## Example: with value of 5, if there is 2 security members out of 5, then 3/5 of roundstart threat will be moved to midround +#ROUNDSTART_SECURITY_FOR_THREAT 5 diff --git a/modular_bandastation/balance/_balance.dme b/modular_bandastation/balance/_balance.dme index 6e7f85ea5e5984..b1cdc16a011380 100644 --- a/modular_bandastation/balance/_balance.dme +++ b/modular_bandastation/balance/_balance.dme @@ -1,6 +1,7 @@ #include "_balance.dm" #include "code/balance_riding.dm" +#include "code/dynamic.dm" #include "code/events.dm" #include "code/station_traits.dm" #include "code/supply_packs.dm" diff --git a/modular_bandastation/balance/code/dynamic.dm b/modular_bandastation/balance/code/dynamic.dm new file mode 100644 index 00000000000000..4617cc64f9962b --- /dev/null +++ b/modular_bandastation/balance/code/dynamic.dm @@ -0,0 +1,3 @@ +/datum/config_entry/number/roundstart_security_for_threat + default = 5 + min_val = 0