Skip to content

Commit

Permalink
You can't attack mobs without combat mode (#580)
Browse files Browse the repository at this point in the history
* You can't attack mobs without combat mode

* fix novaflower burn

* whoops
  • Loading branch information
Kapu1178 authored Sep 15, 2023
1 parent d9f479e commit b08035b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@
if(signal_return & COMPONENT_SKIP_ATTACK)
return

if(!user.combat_mode)
return

SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user, params)

if(item_flags & NOBLUDGEON)
Expand Down
1 change: 1 addition & 0 deletions code/modules/unit_tests/novaflower_burn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// And give them the plant safe trait so we don't have to worry about attacks being cancelled
ADD_TRAIT(botanist, TRAIT_PLANT_SAFE, "unit_test")

botanist.set_combat_mode(TRUE)
// Now, let's get a smack with the novaflower and see what happens.
weapon.melee_attack_chain(botanist, victim)

Expand Down

0 comments on commit b08035b

Please sign in to comment.