AI controllers interactions refactor (#86492)

## About The Pull Request
refactors all behaviors to work through clicking. also removes some now
redundant behaviors. in the future ill try to generalize more of these
behaviors

## Why It's Good For The Game
makes AI controllers work through clicks which may help with swing
combat implementation

## Changelog
🆑
refactor: basic mob AI interactions has been refactored. please report
any bugs
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
Ben10Omintrix
2024-10-03 03:44:41 +02:00
committed by GitHub
co-authored by Ghom
parent 4b1948d124
commit 6897f33767
33 changed files with 111 additions and 147 deletions
@@ -24,9 +24,8 @@
var/mob/living/basic/living_pawn = controller.pawn
var/turf/closed/mineral/target = controller.blackboard[target_key]
var/is_gibtonite_turf = istype(target, /turf/closed/mineral/gibtonite)
if(QDELETED(target))
if(!controller.ai_interact(target = target))
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_FAILED
living_pawn.melee_attack(target)
if(is_gibtonite_turf)
living_pawn.manual_emote("sighs...") //accept whats about to happen to us
@@ -43,6 +43,5 @@
if (distance > max_range || distance < min_range)
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_FAILED
var/mob/living/basic/gunman = controller.pawn
gunman.RangedAttack(target)
controller.ai_interact(target = target, combat_mode = TRUE)
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED