From 9f45b83bcc84c9f26735eda7ed0f0f4c1460b671 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Mon, 2 Dec 2013 11:57:49 +0100 Subject: [PATCH] Only check bot emagging ever 20th tick (Performance optimisation) --- code/modules/events/ion_storm.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index b4dc97d03b0..9161cd8ef98 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -1,7 +1,7 @@ //This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 /datum/event/ionstorm - var/botEmagChance = 0.5 + var/botEmagChance = 20 var/list/players = list() /datum/event/ionstorm/announce() @@ -48,8 +48,9 @@ target << law target.add_ion_law(law) score_eventsendured++ + /datum/event/ionstorm/tick() - if(botEmagChance) + if (botEmagChance && activeFor%20) for(var/obj/machinery/bot/bot in world) if(prob(botEmagChance)) bot.Emag()