From 784ce3f568024d9aa9ae9dbd8fa13e302b95419c Mon Sep 17 00:00:00 2001 From: itseasytosee <55666666+itseasytosee@users.noreply.github.com> Date: Mon, 29 Aug 2022 13:35:45 -0500 Subject: [PATCH] Improvement to monkey AI's weapon selection ability. Won't attack With zero force items. (#69490) Monkeys will now drop the item in their hand when selecting a weapon to attack with if it is worse than their basic bite attack, and will avoid picking up a weapon if they can't find one that's better than their basic bite attack. Because of this, you can no longer completely disable monkeys by filling their hands with zero force items. This also means you can no longer trick monkeys into using sutures and other medical items on you. --- code/datums/ai/monkey/monkey_controller.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/datums/ai/monkey/monkey_controller.dm b/code/datums/ai/monkey/monkey_controller.dm index aad1bf87497..e347b51e362 100644 --- a/code/datums/ai/monkey/monkey_controller.dm +++ b/code/datums/ai/monkey/monkey_controller.dm @@ -128,6 +128,10 @@ have ways of interacting with a specific mob and control it. for(var/obj/item/item in oview(2, living_pawn)) nearby_items += item + for(var/obj/item/item in living_pawn.held_items) // If we've got some garbage in out hands thats going to stop us from effectivly attacking, we should get rid of it. + if(item.force < 2) + living_pawn.dropItemToGround(item) + weapon = GetBestWeapon(src, nearby_items, living_pawn.held_items) var/pickpocket = FALSE @@ -138,6 +142,9 @@ have ways of interacting with a specific mob and control it. pickpocket = TRUE weapon = held_weapon + if(weapon.force < 2) // our bite does 2 damage on avarage, no point in settling for anything less + return FALSE + if(!weapon || (weapon in living_pawn.held_items)) return FALSE