mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
stealth implant cooldown balancing (#21713)
This commit is contained in:
@@ -35,13 +35,9 @@
|
||||
recall_box_animation()
|
||||
return
|
||||
// Box closing from here on out.
|
||||
if(on_cooldown)
|
||||
return FALSE
|
||||
if(!isturf(owner.loc)) //Don't let the player use this to escape mechs/welded closets.
|
||||
to_chat(owner, "<span class='warning'>You need more space to activate this implant!</span>")
|
||||
return
|
||||
addtimer(VARSET_CALLBACK(src, on_cooldown, FALSE), 10 SECONDS)
|
||||
on_cooldown = TRUE
|
||||
owner.playsound_local(owner, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
||||
spawn_box()
|
||||
|
||||
@@ -61,6 +57,22 @@
|
||||
INVOKE_ASYNC(box, TYPE_PROC_REF(/obj/structure/closet/cardboard/agent, go_invisible), 1.7 SECONDS)
|
||||
box.create_fake_box()
|
||||
owner.forceMove(box)
|
||||
RegisterSignal(box, COMSIG_PARENT_QDELETING, PROC_REF(start_cooldown))
|
||||
|
||||
/datum/action/item_action/agent_box/proc/start_cooldown(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
on_cooldown = TRUE
|
||||
addtimer(CALLBACK(src, PROC_REF(end_cooldown)), 10 SECONDS)
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/item_action/agent_box/proc/end_cooldown()
|
||||
on_cooldown = FALSE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/item_action/agent_box/IsAvailable()
|
||||
if(..() && !on_cooldown)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/action/item_action/agent_box/proc/recall_box_animation()
|
||||
var/image/fake_box = image('icons/obj/cardboard_boxes.dmi', owner, "agentbox", ABOVE_MOB_LAYER)
|
||||
|
||||
Reference in New Issue
Block a user