[MIRROR] Stun Batong now turns off/on constantly for short time after emp [MDB IGNORE] (#9601)

* Stun Batong now turns off/on constantly for short time after emp (#62943)

About The Pull Request
title

Why It's Good For The Game
i dunno, seems funny it gives more depth or something allows for more intresting interactions

Changelog
🆑
expansion: Stun Batong now turns off/on constantly for short time after emp

* Stun Batong now turns off/on constantly for short time after emp

Co-authored-by: Colovorat <35225170+Colovorat@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-22 00:11:34 +00:00
committed by GitHub
parent 37dd4a67d6
commit 8ca66e7bb2
+11
View File
@@ -549,6 +549,17 @@
. = ..()
if (!(. & EMP_PROTECT_SELF))
deductcharge(1000 / severity)
if (cell.charge >= cell_hit_cost)
var/scramble_time
scramble_mode()
for(var/loops in 1 to rand(6,12))
scramble_time = rand(5,15)/10
addtimer(CALLBACK(src, .proc/scramble_mode), scramble_time*loops * (1 SECONDS))
/obj/item/melee/baton/security/proc/scramble_mode()
active = !active
playsound(src, "sparks", 75, TRUE, -1)
update_appearance()
/obj/item/melee/baton/security/loaded //this one starts with a cell pre-installed.
preload_cell_type = /obj/item/stock_parts/cell/high