mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
fixes a few problems in ai targetting (#82998)
## About The Pull Request fixes #82964 , fixes #82866 ## Why It's Good For The Game fixes several problems with ai targetting. this pr resolves civil war that was brewing between several mobs. also fixes a major problem where mobs would only search for targets and not perform any other behaviors. also fixes a small problem where mobs would constantly stop and start while chasing targets ## Changelog 🆑 fix: mobs in the same faction will no longer be at odds against one another fix: mobs can now perform behaviors alongside searching for targets fix: mobs will no longer be starting and stopping when chasing targets /🆑
This commit is contained in:
@@ -7,6 +7,7 @@ GLOBAL_LIST_INIT(target_interested_atoms, typecacheof(list(/mob, /obj/machinery/
|
||||
|
||||
/datum/ai_behavior/find_potential_targets
|
||||
action_cooldown = 2 SECONDS
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
/// How far can we see stuff?
|
||||
var/vision_range = 9
|
||||
/// Blackboard key for aggro range, uses vision range if not specified
|
||||
@@ -34,7 +35,7 @@ GLOBAL_LIST_INIT(target_interested_atoms, typecacheof(list(/mob, /obj/machinery/
|
||||
|
||||
// If we're using a field rn, just don't do anything yeah?
|
||||
if(controller.blackboard[BB_FIND_TARGETS_FIELD(type)])
|
||||
return
|
||||
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_FAILED
|
||||
|
||||
var/list/potential_targets = hearers(aggro_range, get_turf(controller.pawn)) - living_mob //Remove self, so we don't suicide
|
||||
|
||||
|
||||
Reference in New Issue
Block a user