From 30cb187d265b9a20f4bf6a8d1743a3e8136f4b4f Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 22 Dec 2013 05:48:13 -0500 Subject: [PATCH] Added population scaling to carp spawn event --- code/modules/events/carp_migration.dm | 5 ++++- code/modules/events/event.dm | 1 + code/modules/events/tgevents/brand_intelligence.dm | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index e90e20c9f88..65b4d9bba30 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -12,9 +12,12 @@ command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") /datum/event/carp_migration/start() + scaling_factor = num_players() / 25 + for(var/obj/effect/landmark/C in landmarks_list) if(C.name == "carpspawn") - spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc)) + if(prob(60 * scaling_factor)) + spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc)) /datum/event/carp_migration/end() for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp) diff --git a/code/modules/events/event.dm b/code/modules/events/event.dm index b34c9151ca9..13109e516c4 100644 --- a/code/modules/events/event.dm +++ b/code/modules/events/event.dm @@ -6,6 +6,7 @@ var/activeFor = 0 //How long the event has existed. You don't need to change this. var/area/impact_area + var/scaling_factor // Used to scale spawns to server pop. //Called first before processing. //Allows you to setup your event, such as randomly //setting the startWhen and or announceWhen variables. diff --git a/code/modules/events/tgevents/brand_intelligence.dm b/code/modules/events/tgevents/brand_intelligence.dm index b88c07b7be3..4c0c588f7e0 100644 --- a/code/modules/events/tgevents/brand_intelligence.dm +++ b/code/modules/events/tgevents/brand_intelligence.dm @@ -5,7 +5,6 @@ var/list/obj/machinery/vending/vendingMachines = list() var/list/obj/machinery/vending/infectedMachines = list() var/obj/machinery/vending/originMachine - var/scaling_factor /datum/event/brand_intelligence/announce() command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")