Files
Bubberstation/code/datums/ai/monkey
SkyratBot 2ba69d8b54 [MIRROR] basic mobs & co no longer indiscriminately perform close-range actions in the presence of obstacles. [MDB IGNORE] (#21521)
* basic mobs & co no longer indiscriminately perform close-range actions in the presence of obstacles. (#75687)

## About The Pull Request
Currently, we don't have any such thing as a general ai_behavior flag
for behaviors that need a check for if the current_movement_target is
within reach or not. We could fix it case by case by slapping a
`CanReach()` check in the `performBehavior()` definition of every
`ai_behavior` datum that warrants it, the general issue will keep
resurfacing as long as new behaviors are added to the game anyhow, while
there's a lot less copypasta involved easier to apply solution to
current and future instances of such issue.

Worth mentioning not all ai_behaviors with required_range of 1 have this
flag. Some are fairly innocuous, such as the follow command, some others
kind of handle it already in a more peculiar or complex way, which is
also an argument against making it a hardcoded heck for when the
required_range is 1 or 0.

This has been tested, though there are some rough edges and oddities
also unrelated to his PR that might have evaded scrutiny.

## Why It's Good For The Game
This should fix #74823, fix #69254, and fix #74713 (I guess? it could
have been phrased better).

## Changelog

🆑
fix: basic mobs & co no longer indiscriminately perform close-range
actions in the presence of obstacles such as directional windows between
them and their target.
fix: Doggos should look at you with longing eyes once again if you dare
pick up an edible they are trying to eat.
/🆑

* basic mobs & co no longer indiscriminately perform close-range actions in the presence of obstacles.

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-05-31 23:15:23 +12:00
..