Add a cooldown to machine sparks. (#32460)

This commit is contained in:
Alan
2026-08-28 23:46:48 +00:00
committed by GitHub
parent 231616050a
commit eb5fb9b642
+4 -1
View File
@@ -33,6 +33,7 @@
var/interact_offline = FALSE // Can the machine be interacted with while de-powered.
/// This is if the machinery is being repaired
var/being_repaired = FALSE
COOLDOWN_DECLARE(sparks_cooldown)
new_attack_chain = TRUE
@@ -535,7 +536,9 @@
return FALSE
if(!prob(prb))
return FALSE
do_sparks(5, 1, src)
if(COOLDOWN_FINISHED(src, sparks_cooldown))
do_sparks(5, 1, src)
COOLDOWN_START(src, sparks_cooldown, 1 SECONDS)
if(electrocute_mob(user, get_area(src), src, siemens_strength, TRUE))
return TRUE
return FALSE