From f30163b365feeb5bbc0bce5df4b5f069227f080b Mon Sep 17 00:00:00 2001 From: coiax Date: Mon, 17 Apr 2017 09:09:36 +0100 Subject: [PATCH] Configuration option for number of roundstart mice (#26133) This was actually requested, because it turns out testing powernets is hard if mice randomly chew wires sometimes. --- code/controllers/configuration.dm | 4 ++++ code/controllers/subsystem/squeak.dm | 4 +++- config/game_options.txt | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 60560997dfd..35f12e4dc51 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -260,6 +260,8 @@ var/arrivals_shuttle_dock_window = 55 //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station var/arrivals_shuttle_require_safe_latejoin = FALSE //Require the arrivals shuttle to be operational in order for latejoiners to join + var/mice_roundstart = 10 // how many wire chewing rodents spawn at roundstart. + /datum/configuration/New() gamemode_cache = typecacheof(/datum/game_mode,TRUE) for(var/T in gamemode_cache) @@ -772,6 +774,8 @@ arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value)) if("arrivals_shuttle_require_safe_latejoin") arrivals_shuttle_require_safe_latejoin = text2num(value) + if("mice_roundstart") + mice_roundstart = text2num(value) else GLOB.diary << "Unknown setting in configuration: '[name]'" diff --git a/code/controllers/subsystem/squeak.dm b/code/controllers/subsystem/squeak.dm index d7ee9c31c2a..a4f0d6e52dd 100644 --- a/code/controllers/subsystem/squeak.dm +++ b/code/controllers/subsystem/squeak.dm @@ -10,9 +10,11 @@ SUBSYSTEM_DEF(squeak) var/list/exposed_wires = list() /datum/controller/subsystem/squeak/Initialize(timeofday) - trigger_migration() + trigger_migration(config.mice_roundstart) /datum/controller/subsystem/squeak/proc/trigger_migration(num_mice=10) + if(!num_mice) + return find_exposed_wires() var/mob/living/simple_animal/mouse/M diff --git a/config/game_options.txt b/config/game_options.txt index f912fc58e44..8b4a583edd8 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -483,4 +483,9 @@ Space_Budget 16 ARRIVALS_SHUTTLE_DOCK_WINDOW 55 #Set this to 1 to prevent late join players from spawning if the arrivals shuttle is depressurized -ARRIVALS_SHUTTLE_REQUIRE_SAFE_LATEJOIN 0 \ No newline at end of file +ARRIVALS_SHUTTLE_REQUIRE_SAFE_LATEJOIN 0 + +# How many wirechewing rodents you want to spawn on exposed maintenane wires at the start of the round. You may wish to set this to 0 if you're testing powernets. + +MICE_ROUNDSTART 10 +