This commit is contained in:
silicons
2020-07-18 18:34:16 -07:00
parent 0b98b0409b
commit 0c6368e3e7
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
return
if(QDELETED(src) || QDELETED(target))
return
PostattackClickdelaySet(user, target))
PostattackClickdelaySet(user, target)
afterattack(target, user, TRUE, params)
/// Like melee_attack_chain but for ranged.
+4 -1
View File
@@ -73,6 +73,8 @@
var/clickdelay_from_next_action = FALSE
/// This item ignores next action delays.
var/clickdelay_ignores_next_action = FALSE
/// This item sets clickdelay in preattack rather than post attack. This means it's set in a melee attack even if the user doesn't bash or bop it against something.
var/clickdelay_set_on_pre_attack = FALSE
/**
* Checks if a user's clickdelay is met for a standard attack
@@ -84,7 +86,8 @@
* Called if check is successful before the attack happens.
*/
/obj/item/proc/PreattackClickdelaySet(mob/user, atom/target)
user.DelayNextAction(0, FALSe, TRUE)
if(clickdelay_set_on_pre_attack)
user.DelayNextAction(0, FALSe, TRUE)
/**
* Called after a successful attack to set a mob's clickdelay.