diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 89f281678a8..07ab4fd8985 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -78,7 +78,7 @@ #define INIT_ORDER_STICKY_BAN -10 #define INIT_ORDER_LIGHTING -20 #define INIT_ORDER_SHUTTLE -21 -#define INIT_ORDER_SQUEAK -40 +#define INIT_ORDER_MINOR_MAPPING -40 #define INIT_ORDER_PATH -50 #define INIT_ORDER_PERSISTENCE -100 diff --git a/code/controllers/subsystem/squeak.dm b/code/controllers/subsystem/minor_mapping.dm similarity index 61% rename from code/controllers/subsystem/squeak.dm rename to code/controllers/subsystem/minor_mapping.dm index 861bb0d8d5a..bce42c72115 100644 --- a/code/controllers/subsystem/squeak.dm +++ b/code/controllers/subsystem/minor_mapping.dm @@ -1,22 +1,14 @@ -// The Squeak -// because this is about placement of mice mobs, and nothing to do with -// mice - the computer peripheral - -SUBSYSTEM_DEF(squeak) - name = "Squeak" - init_order = INIT_ORDER_SQUEAK +SUBSYSTEM_DEF(minor_mapping) + name = "Minor Mapping" + init_order = INIT_ORDER_MINOR_MAPPING flags = SS_NO_FIRE - var/list/exposed_wires = list() - -/datum/controller/subsystem/squeak/Initialize(timeofday) +/datum/controller/subsystem/minor_mapping/Initialize(timeofday) trigger_migration(CONFIG_GET(number/mice_roundstart)) return ..() -/datum/controller/subsystem/squeak/proc/trigger_migration(num_mice=10) - if(!num_mice) - return - find_exposed_wires() +/datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10) + var/list/exposed_wires = find_exposed_wires() var/mob/living/simple_animal/mouse/M var/turf/proposed_turf @@ -31,8 +23,9 @@ SUBSYSTEM_DEF(squeak) num_mice -= 1 M = null -/datum/controller/subsystem/squeak/proc/find_exposed_wires() - exposed_wires.Cut() +/proc/find_exposed_wires() + var/list/exposed_wires = list() + var/list/all_turfs for (var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z)) @@ -41,3 +34,5 @@ SUBSYSTEM_DEF(squeak) continue if(locate(/obj/structure/cable) in T) exposed_wires += T + + return shuffle(exposed_wires) diff --git a/code/modules/events/mice_migration.dm b/code/modules/events/mice_migration.dm index 0b3a8d8ea90..19c1c5541c4 100644 --- a/code/modules/events/mice_migration.dm +++ b/code/modules/events/mice_migration.dm @@ -24,4 +24,4 @@ 'sound/effects/mousesqueek.ogg') /datum/round_event/mice_migration/start() - SSsqueak.trigger_migration(rand(minimum_mice, maximum_mice)) + SSminor_mapping.trigger_migration(rand(minimum_mice, maximum_mice)) diff --git a/tgstation.dme b/tgstation.dme index 6d0528ecbc2..44400b03544 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -236,6 +236,7 @@ #include "code\controllers\subsystem\machines.dm" #include "code\controllers\subsystem\mapping.dm" #include "code\controllers\subsystem\medals.dm" +#include "code\controllers\subsystem\minor_mapping.dm" #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\moods.dm" #include "code\controllers\subsystem\nightshift.dm" @@ -253,7 +254,6 @@ #include "code\controllers\subsystem\server_maint.dm" #include "code\controllers\subsystem\shuttle.dm" #include "code\controllers\subsystem\spacedrift.dm" -#include "code\controllers\subsystem\squeak.dm" #include "code\controllers\subsystem\stickyban.dm" #include "code\controllers\subsystem\sun.dm" #include "code\controllers\subsystem\tgui.dm"