Skip to content

Commit

Permalink
Update click.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Apr 28, 2024
1 parent e74e9c4 commit f58eaf7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,26 @@
if(W.attack_speed && !src.contains(A)) //Not being worn or carried in the user's inventory somewhere, including internal storages.
next_move += W.attack_speed

if(!A.attackby(W, src, mods) && A && !QDELETED(A))
var/attackby_result = A.attackby(W, src, mods)

if(!attackby_result && A && !QDELETED(A))
// in case the attackby slept
if(!W)
UnarmedAttack(A, 1, mods)
return

W.afterattack(A, src, 1, mods)
W.afterattack(A, src, 1, mods)

// Looks goofy when you swipe at the floor with a gun
if(istype(W, /obj/item/weapon/gun))
return

var/mob/living/self = src
self.animation_attack_on(A)
src.visible_message(SPAN_DANGER("[src] swipes at \the [A] with [W]!"), \
SPAN_DANGER("You swipe at \the [A] with [W]!"), null, 5, CHAT_TYPE_WEAPON_USE)


else
if(!isitem(A) && !issurface(A))
next_move += 4
Expand Down

0 comments on commit f58eaf7

Please sign in to comment.