mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
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:
@@ -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
|
||||
/////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user