mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user