From 4a370a7b81f929bb7d1d12df1561897b89bc66e8 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sun, 10 Sep 2023 15:45:30 -0400 Subject: [PATCH 1/3] You can't attack mobs without combat mode --- code/_onclick/item_attack.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 007a10ffb6f8..959af2290111 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -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) From 6b720ae086296e644e6c4d4731ae98cd082d5171 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sun, 10 Sep 2023 16:08:28 -0400 Subject: [PATCH 2/3] fix novaflower burn --- code/modules/unit_tests/novaflower_burn.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/unit_tests/novaflower_burn.dm b/code/modules/unit_tests/novaflower_burn.dm index c54cb9d6d152..a598dec517f4 100644 --- a/code/modules/unit_tests/novaflower_burn.dm +++ b/code/modules/unit_tests/novaflower_burn.dm @@ -31,6 +31,7 @@ TEST_ASSERT(victim.on_fire, "[weapon] didn't set the target on fire after an attack.") // Lastly we should check that degredation to zero works. + botanist.set_combat_mode(TRUE) weapon.force = 0 weapon.melee_attack_chain(botanist, victim) From b3a900b9575d3c69f34ef55ce3eda86510f53ab8 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sun, 10 Sep 2023 17:09:38 -0400 Subject: [PATCH 3/3] whoops --- code/modules/unit_tests/novaflower_burn.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/unit_tests/novaflower_burn.dm b/code/modules/unit_tests/novaflower_burn.dm index a598dec517f4..fbc1e582d6b8 100644 --- a/code/modules/unit_tests/novaflower_burn.dm +++ b/code/modules/unit_tests/novaflower_burn.dm @@ -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) @@ -31,7 +32,6 @@ TEST_ASSERT(victim.on_fire, "[weapon] didn't set the target on fire after an attack.") // Lastly we should check that degredation to zero works. - botanist.set_combat_mode(TRUE) weapon.force = 0 weapon.melee_attack_chain(botanist, victim)