mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Cleans up rat related features and makes Regal Ratking a rare spawn from mouse migration event. (#1195)
* Cleans up rat related features and makes Regal Ratking a rare spawn from mouse migration event. (#54191) * Cleans up rat related features and makes Regal Ratking a rare spawn from mouse migration event. Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#define PROB_MOUSE_SPAWN 98
|
||||
|
||||
SUBSYSTEM_DEF(minor_mapping)
|
||||
name = "Minor Mapping"
|
||||
init_order = INIT_ORDER_MINOR_MAPPING
|
||||
@@ -11,15 +13,18 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
/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/mob/living/simple_animal/M
|
||||
var/turf/proposed_turf
|
||||
|
||||
while((num_mice > 0) && exposed_wires.len)
|
||||
proposed_turf = pick_n_take(exposed_wires)
|
||||
if(!M)
|
||||
M = new(proposed_turf)
|
||||
if(prob(PROB_MOUSE_SPAWN))
|
||||
if(!M)
|
||||
M = new(proposed_turf)
|
||||
else
|
||||
M.forceMove(proposed_turf)
|
||||
else
|
||||
M.forceMove(proposed_turf)
|
||||
M = new /mob/living/simple_animal/hostile/regalrat/controlled(proposed_turf)
|
||||
if(M.environment_air_is_safe())
|
||||
num_mice -= 1
|
||||
M = null
|
||||
@@ -57,3 +62,5 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
suitable += t
|
||||
|
||||
return shuffle(suitable)
|
||||
|
||||
#undef PROB_MOUSE_SPAWN
|
||||
|
||||
Reference in New Issue
Block a user