mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user