Adds a global spark limit (#24197)

* Adds a global spark limit

* spacing

* Moves logic into when the effect is actually generated

* don't want this kicking around

* spacing

* oops
This commit is contained in:
Luc
2024-02-17 14:20:03 +00:00
committed by GitHub
parent b4dd74689e
commit 021756999d
2 changed files with 15 additions and 0 deletions
@@ -45,6 +45,17 @@
/datum/effect_system/spark_spread
effect_type = /obj/effect/particle_effect/sparks
/datum/effect_system/spark_spread/generate_effect()
var/spark_budget = GLOBAL_SPARK_LIMIT - GLOB.sparks_active
if(spark_budget <= 0)
return
GLOB.sparks_active++
return ..()
/datum/effect_system/spark_spread/decrement_total_effect()
GLOB.sparks_active--
return ..()
//////////////////////////////////
//////SPARKLE FIREWORKS
/////////////////////////////////