diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index a669f9024f..199e401e39 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -63,7 +63,7 @@ return . |= I.attack(src, user, attackchain_flags, damage_multiplier) if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) // SAFETY NET - unless the proc tells us we should not handle this, give them the basic melee cooldown! - I.ApplyAttackCooldown(user, src) + I.ApplyAttackCooldown(user, src, attackchain_flags) /** * Called when someone uses us to attack a mob in melee combat. @@ -138,13 +138,13 @@ if(!(SKILL_TRAIN_ATTACK_OBJ in I.used_skills[skill])) continue user.mind.auto_gain_experience(skill, I.skill_gain) - I.ApplyAttackCooldown(user, src) + if(!(attackchain_flags & NO_AUTO_CLICKDELAY_HANDLING)) + I.ApplyAttackCooldown(user, src, attackchain_flags) if(totitemdamage) visible_message("[user] has hit [src] with [I]!", null, null, COMBAT_MESSAGE_RANGE) //only witnesses close by and the victim see a hit message. log_combat(user, src, "attacked", I) take_damage(totitemdamage, I.damtype, "melee", 1) - return TRUE /mob/living/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) var/list/block_return = list() diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index c993026105..270d3601fd 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -667,6 +667,8 @@ var/bleed_stacks_per_hit = 3 total_mass = 2.75 total_mass_on = 5 + attack_speed = 0 + attack_unwieldlyness = CLICK_CD_MELEE * 0.5 /obj/item/melee/transforming/cleaving_saw/examine(mob/user) . = ..() @@ -685,8 +687,12 @@ return FALSE . = ..() if(.) + if(active) + attack_unwieldlyness = CLICK_CD_MELEE + else + attack_unwieldlyness = CLICK_CD_MELEE * 0.5 transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5) - user.SetNextAction(CLICK_CD_MELEE * 0.25) + user.SetNextAction(CLICK_CD_MELEE * 0.25, considered_action = FALSE, flush = TRUE) /obj/item/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text) if(!supress_message_text) @@ -701,11 +707,6 @@ to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(10) -/obj/item/melee/transforming/cleaving_saw/ApplyAttackCooldown(mob/user, atom/target) - . = ..() - if(!active) - user.SetNextAction(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly - /obj/item/melee/transforming/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target) var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED) if(!B) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index d570650789..b1df87303e 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -190,8 +190,8 @@ /** * Called after a successful attack to set a mob's clickdelay. */ -/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target) - user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass) +/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target, attackchain_flags) + user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass, !(attackchain_flags & ATTACK_IGNORE_ACTION)) /** * Get estimated time that a user has to not attack for to use us diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 12bd4f2828..8e9f5574e0 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -87,7 +87,7 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/adjustHealth(amount, updating_health = TRUE, forced = FALSE) var/adjustment_amount = amount * 0.1 if(world.time + adjustment_amount > next_action) - DelayNextAction(adjustment_amount, flush = TRUE) //attacking it interrupts it attacking, but only briefly + DelayNextAction(adjustment_amount, considered_action = FALSE, flush = TRUE) //attacking it interrupts it attacking, but only briefly . = ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/death() @@ -126,7 +126,8 @@ Difficulty: Medium L.gib() return TRUE DelayNextAction(CLICK_CD_MELEE, flush = TRUE) - miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY) + miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY | ATTACK_IGNORE_ACTION | NO_AUTO_CLICKDELAY_HANDLING) + DiscardCurrentAction() if(guidance) adjustHealth(-2) transform_weapon()