From 927f832b99cf7d2c486a3651d8b043b4ff0b42b2 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Fri, 6 Dec 2013 17:04:25 +0100 Subject: [PATCH] Fixed false alarm message for infestation event --- code/modules/events/infestation.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 0c128914bbe..068b9045cdf 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -20,12 +20,13 @@ var/locstring var/vermin var/vermstring - -/datum/event/infestation/start() - - location = rand(0,9) var/list/turf/simulated/floor/turfs = list() var/spawn_area_type + var/list/spawn_types = list() + var/max_number + +/datum/event/infestation/setup() + location = rand(0,9) switch(location) if(LOC_KITCHEN) spawn_area_type = /area/crew_quarters/kitchen @@ -69,8 +70,6 @@ if(!F.contents.len) turfs += F - var/list/spawn_types = list() - var/max_number vermin = rand(0,2) switch(vermin) if(VERM_MICE) @@ -85,6 +84,9 @@ spawn_types = list(/obj/effect/spider/spiderling) vermstring = "spiders" + + +/datum/event/infestation/start() spawn(0) var/num = rand(2,max_number) while(turfs.len > 0 && num > 0)