fixes a bunch of broken clickdelays (#13218)

* fixes

* fix
This commit is contained in:
silicons
2020-08-25 11:58:20 -07:00
committed by GitHub
parent d4196650fd
commit 8699ce2174
6 changed files with 32 additions and 16 deletions
+5 -1
View File
@@ -86,6 +86,10 @@
/obj/structure/grille/attack_animal(mob/user)
. = ..()
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
return
user.DelayNextAction(flush = TRUE)
user.do_attack_animation(src)
if(!shock(user, 70) && !QDELETED(src)) //Last hit still shocks but shouldn't deal damage to the grille)
take_damage(rand(5,10), BRUTE, "melee", 1)
@@ -114,12 +118,12 @@
/obj/structure/grille/attack_alien(mob/living/user)
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
return
user.DelayNextAction(flush = TRUE)
user.do_attack_animation(src)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
if(!shock(user, 70))
take_damage(20, BRUTE, "melee", 1)
/obj/structure/grille/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && (mover.pass_flags & PASSGRILLE))
return TRUE