Skip to content

Commit

Permalink
racks check for harm intent
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Oct 10, 2024
1 parent aeccb49 commit 28592ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,13 @@
return
if(user.body_position == LYING_DOWN || user.usable_legs < 2)
return

if(user.a_intent != INTENT_HARM)
to_chat(user, span_danger("You aren't HARMFUL enough to beat the rack."))
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='danger'>[user] kicks [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
user.visible_message(span_danger("[user] kicks [src]."), null, null, COMBAT_MESSAGE_RANGE)
take_damage(rand(4,8), BRUTE, "melee", 1)

/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
Expand Down

0 comments on commit 28592ef

Please sign in to comment.