From 5b8358cb7465e29e87aae0f845d86a035ea1ea63 Mon Sep 17 00:00:00 2001 From: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Date: Sat, 28 Sep 2024 05:18:57 +0300 Subject: [PATCH] raptor retaliate targetting fix (#86925) ## About The Pull Request raptors werent meant to retaliate against each other or against their owner. this was initially handled by their targeting strategy, however some changes to it at some point broke this. raptors would now over-escalate conflicts against troublemaker raptors, locking both into a deathmatch. this fixes that ## Why It's Good For The Game fixes raptor retaliate targetting ## Changelog :cl: fix: fixes raptors retaliating against each other and their owners /:cl: --- .../lavaland/raptor/raptor_ai_controller.dm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/living/basic/lavaland/raptor/raptor_ai_controller.dm b/code/modules/mob/living/basic/lavaland/raptor/raptor_ai_controller.dm index a23bcf7801b..8178df7b78c 100644 --- a/code/modules/mob/living/basic/lavaland/raptor/raptor_ai_controller.dm +++ b/code/modules/mob/living/basic/lavaland/raptor/raptor_ai_controller.dm @@ -8,8 +8,8 @@ "wags their tail against", "playfully leans against" ), - BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/raptor, - BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/raptor, + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, + BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic, BB_BABIES_PARTNER_TYPES = list(/mob/living/basic/raptor), BB_BABIES_CHILD_TYPES = list(/mob/living/basic/raptor/baby_raptor), BB_MAX_CHILDREN = 5, @@ -23,7 +23,7 @@ /datum/ai_planning_subtree/find_and_hunt_target/heal_raptors, /datum/ai_planning_subtree/random_speech/blackboard, /datum/ai_planning_subtree/pet_planning, - /datum/ai_planning_subtree/target_retaliate, + /datum/ai_planning_subtree/target_retaliate/check_faction, /datum/ai_planning_subtree/simple_find_target, /datum/ai_planning_subtree/basic_melee_attack_subtree, /datum/ai_planning_subtree/find_and_hunt_target/raptor_trough, @@ -41,19 +41,13 @@ RegisterSignal(new_pawn, COMSIG_MOB_ATE, PROC_REF(post_eat)) /datum/ai_controller/basic_controller/raptor/proc/post_eat() + SIGNAL_HANDLER clear_blackboard_key(BB_RAPTOR_TROUGH_TARGET) set_blackboard_key(BB_RAPTOR_EAT_COOLDOWN, world.time + NEXT_EAT_COOLDOWN) -/datum/targeting_strategy/basic/raptor - -//dont attack anyone that shares our factions. -/datum/targeting_strategy/basic/raptor/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target) - . = ..() - return . - /datum/ai_controller/basic_controller/baby_raptor blackboard = list( - BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/raptor, + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, BB_FIND_MOM_TYPES = list(/mob/living/basic/raptor), BB_IGNORE_MOM_TYPES = list(/mob/living/basic/raptor/baby_raptor), )