Merge branch 'master' into master

This commit is contained in:
Thalpy
2019-07-14 15:10:32 +01:00
committed by GitHub
92 changed files with 834 additions and 565 deletions

View File

@@ -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,7 +23,8 @@ SUBSYSTEM_DEF(squeak)
num_mice -= 1
M = null
/datum/controller/subsystem/squeak/proc/find_exposed_wires()
/proc/find_exposed_wires()
var/list/exposed_wires = list()
exposed_wires.Cut()
var/list/all_turfs
for (var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
@@ -41,3 +34,5 @@ SUBSYSTEM_DEF(squeak)
continue
if(locate(/obj/structure/cable) in T)
exposed_wires += T
return shuffle(exposed_wires)