we are only keeping track of the number of singu beacons, var more efficient.

This commit is contained in:
Ghommie
2019-10-05 05:29:57 +02:00
parent 35a6991300
commit 52fb4b03ac
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
GLOBAL_INIT_LIST(singularity_beacons)
GLOBAL_VAR_INIT(singularity_counter, 0)
#define METEOR_DISASTER_MODIFIER 0.5
@@ -29,7 +29,7 @@ GLOBAL_INIT_LIST(singularity_beacons)
if(user)
to_chat(user, "<span class='notice'>The connected wire doesn't have enough current.</span>")
return
GLOB.singularity_beacons += src
GLOB.singularity_counter++
for(var/datum/round_event_control/meteor_wave/W in SSevents.control)
W.weight += round(initial(W.weight) * METEOR_DISASTER_MODIFIER)
for(var/obj/singularity/singulo in GLOB.singularities)
@@ -49,7 +49,7 @@ GLOBAL_INIT_LIST(singularity_beacons)
active = 0
if(user)
to_chat(user, "<span class='notice'>You deactivate the beacon.</span>")
GLOB.singularity_beacons -= src
GLOB.singularity_counter--
for(var/datum/round_event_control/meteor_wave/W in SSevents.control)
W.weight -= round(initial(W.weight) * METEOR_DISASTER_MODIFIER)