Skip to content

Commit

Permalink
Fix: add exosuit punch miss condition case (ss220-space#687)
Browse files Browse the repository at this point in the history
https://cdn.discordapp.com/attachments/907288887024553984/1182984005637910588/2023-12-09_14-55-00.mp4?ex=6586aeb5&is=657439b5&hm=540a8c5fdcff195d5ed1c03c14db2bb885656d01aeea2b8df1dbe09436b9b5a8&
Теперь мех точно не даст леща, если цель ушла с места атаки.

---------

Co-authored-by: SuhEugene <[email protected]>
  • Loading branch information
AmShegars and SuhEugene authored Dec 9, 2023
1 parent c77e22c commit a0b3a41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/modules/mechs/mech_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,14 @@
setClickCooldown(arms ? arms.action_delay : 7)
src.visible_message(SPAN_DANGER(" [src] steps back, preparing for a punch!"), blind_message = SPAN_DANGER("You hear the loud hissing of hydraulics!"))
playsound(src.loc, mech_step_sound, 60, 1)
if(do_after(src, 1.2 SECONDS, get_turf(src),DO_SHOW_PROGRESS|DO_FAIL_FEEDBACK|DO_USER_CAN_TURN|DO_TARGET_CAN_TURN| DO_USER_UNIQUE_ACT | DO_PUBLIC_PROGRESS) && user)
var/target_prev_loc = A.loc
if(do_after(src, 1.2 SECONDS, get_turf(src), DO_DEFAULT|DO_USER_UNIQUE_ACT|DO_PUBLIC_PROGRESS) && user)
if(target_prev_loc != A.loc)
src.visible_message(SPAN_DANGER(" [src] misses with his attack!"))
do_attack_effect(target_prev_loc, "smash")
setClickCooldown(arms ? arms.action_delay : 7)
playsound(src.loc, arms_punch_sound, 50, 1)
return
if(istype(A, /obj/machinery/door/firedoor) )
var/obj/machinery/door/firedoor/FD = A
if(!FD.blocked)
Expand Down

0 comments on commit a0b3a41

Please sign in to comment.