Skip to content

Commit

Permalink
Synth Hammer delay and warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostsheet committed Jul 20, 2023
1 parent a4d413c commit 3e95b61
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,25 +323,29 @@
item_state = "syn_breacher"
force_wielded = MELEE_FORCE_VERY_STRONG
really_heavy = TRUE
var/move_delay_addition = 1.5

/obj/item/weapon/twohanded/breacher/synth/pickup(mob/user)
if(!(HAS_TRAIT(user, TRAIT_SUPER_STRONG)))
to_chat(user, SPAN_WARNING("You barely manage to lift \the [src] above your knees. This thing will probably be useless to you."))
user.apply_effect(1.1, SLOW)
START_PROCESSING(SSobj, src)
to_chat(user, SPAN_HIGHDANGER("You barely manage to lift \the [src] above your knees. This thing will probably be useless to you."))
user.apply_effect(6, EYE_BLUR)
user.apply_effect(3, DAZE)
user.emote("pain")
RegisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY, PROC_REF(handle_movedelay))

return
..()

/obj/item/weapon/twohanded/breacher/synth/proc/handle_movedelay(mob/living/M, list/movedata)
SIGNAL_HANDLER
movedata["move_delay"] += move_delay_addition

/obj/item/weapon/twohanded/breacher/synth/dropped(mob/user, silent)
. = ..()
UnregisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY)

/obj/item/weapon/twohanded/breacher/synth/attack(target as mob, mob/living/user as mob)
if(!HAS_TRAIT(user, TRAIT_SUPER_STRONG))
to_chat(user, SPAN_WARNING("\The [src] is too heavy for you to use as a weapon!"))
return
..()

/obj/item/weapon/twohanded/breacher/synth/process()
var/mob/user = src.loc
if(istype(user) && !(HAS_TRAIT(user, TRAIT_SUPER_STRONG)))
user.apply_effect(1.1, SLOW)
return

STOP_PROCESSING(SSobj, src)

0 comments on commit 3e95b61

Please sign in to comment.