mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Only check bot emagging ever 20th tick (Performance optimisation)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user