-
Notifications
You must be signed in to change notification settings - Fork 345
Refactors some cleaning slimes behaviors to be subtypes of cleanbot behaviors #5657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Absolucy
merged 9 commits into
Monkestation:master
from
LikeLakers2:project/refactor/cleaning-slime-behaviors
Mar 11, 2025
Merged
Refactors some cleaning slimes behaviors to be subtypes of cleanbot behaviors #5657
Absolucy
merged 9 commits into
Monkestation:master
from
LikeLakers2:project/refactor/cleaning-slime-behaviors
Mar 11, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Consider this a continuation of tgstation/tgstation#80202  ~~It seems I missed a few.~~ Edit: Modified per request to handle this more broadly. If a pawn gets `qdel`'d, the ai controller should be set to off and get removed from the list of active controllers, and all their actions should be canceled. Also adds some qdeleted checks to `finish_action()`, which can still run after the pawn gets qdeleted as part of the `CancelActions()` chain. Less spurious CI failures. Nothing player facing really.
…their blacklist (#80708) ## About The Pull Request bots will automatically add things it cant reach to a temporary blacklist and ignore them until the blacklist is cleared. this however can cause issues if u move out of the way of a stationary medbot while its healing u, so it deems u unreachable and not try to heal u until the blacklist is cleared ## Why It's Good For The Game bots will automatically add things it cant reach to a temporary blacklist and ignore them until the blacklist is cleared. this however can cause issues if u move out of the way of a stationary medbot while its healing u, so it deems u unreachable and not try to heal u until the blacklist is cleared ## Changelog :cl: fix: stationary medbots will no longer ignore u for a while if u move out of their way while healing /:cl:
fixes the flaky error that would happen in cleanbot controllers. i discovered thru the profiler that a proc i was using to stop tracking unreachable targets and caching them to a blacklist in selectbehavior had a bit of a high real time cost, so if the mob got deleted midway through for any reason would cause a runtime error. ive moved this proc off selectbehavior and im instead letting the move loop cache this target into the blacklist if it reaches the max pathing attempts fixes a runtime that sometimes happens in ai controllers :cl: fix: fixes a runtime that sometimes happens in ai controllers /:cl:
51465a0
to
bd95fae
Compare
…ior/execute_clean/slime` Currently it does nothing extra atop `/datum/ai_behavior/execute_clean`, but I've left the datum there just in case we want to make it behave differently in the future.
ffd2196
to
58165a9
Compare
This was referenced Mar 8, 2025
Closed
Open
This was referenced Mar 10, 2025
tired-wired
pushed a commit
that referenced
this pull request
Mar 29, 2025
## About The Pull Request #5657 unintentionally removed the `TRAIT_TRASH_ITEM` check, which broke the ability for cleaner slimes to target things like used ammo, used mutation syringes, emptied drink bottles, burnt matches, and such. ## Why It's Good For The Game bugfix ## Changelog :cl: fix: Cleaner slimes now properly target other types of trash (used ammo, used mutation syringes, emptied drink bottles, burnt matches, etc) again. /:cl:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
Requested by @Absolucy.
Cleaning slimes act similarly to cleanbots, just with different targets. Unfortunately, the cleaning slime code does not reuse the cleanbot code where it can - leading to duplicated code, and in turn, bugs.
This PR attempts to fix this by refactoring such ai behavior code into subtypes of cleanbot behaviors, where I can figure out how to make it work.
To do so, this PR ports the following supporting PRs from tgstation:
And in fixing all this, I incidentally also fixed player-controlled cleaner slimes not being able to clean cleanables.
Why It's Good For The Game
Reduces maintenance costs for cleaning slimes.
Changelog
🆑MichiRecRoom, vinylspiders, Ben10Omintrix
fix: (Ben10Omintrix) stationary medbots will no longer ignore u for a while if u move out of their way while healing
fix: (Ben10Omintrix) fixes a runtime that sometimes happens in ai controllers
refactor: (MichiRecRoom) Some cleaning slime behaviors have been refactored to use similar behaviors as cleanbots.
fix: (MichiRecRoom) Cleaner slimes should now temporarily ignore things that they can't reach.
fix: (MichiRecRoom) Player-controlled cleaner slimes should now be able to clean cleanables.
/:cl: