Skip to content

Move HTN Preconditions and Operators to IDependencyCollection instead of IoCManager#43694

Open
jessicamaybe wants to merge 10 commits intospace-wizards:masterfrom
jessicamaybe:2026-04-22-HTN-iDependency
Open

Move HTN Preconditions and Operators to IDependencyCollection instead of IoCManager#43694
jessicamaybe wants to merge 10 commits intospace-wizards:masterfrom
jessicamaybe:2026-04-22-HTN-iDependency

Conversation

@jessicamaybe
Copy link
Copy Markdown
Contributor

About the PR

Moved HTN Preconditions and Operators to IDependencyCollection instead of IoCManager

Why / Balance

its 2026 I don't want to use IEntityManager.System<T> for everything

Technical details

  • things resolves via dependencies now instead of having to do it manually
  • all of the operators/preconditions use mostly shared code now (npcs in shared one day 🙏)
  • slight changese in medibot system (princess cheeseballs made me do it)

Media

Requirements

Breaking changes

HTNOperator's and HTNPrecondition's now resolve their dependencies via IDependencyCollection instead of IoCManager

HTN Operators and Preconditions will need to be refactored to to use [Dependency] instead of _entMan.System<T>

Changelog

@PJBot PJBot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/M Denotes a PR that changes 100-999 lines. labels Apr 23, 2026
@Pok27 Pok27 added P3: Standard Priority: Default priority for repository items. T: Refactor Type: Refactor of notable amount of codebase D2: Medium Difficulty: A good amount of codebase knowledge required. T: Cleanup Type: Code clean-up, without being a full refactor or feature D3: Low Difficulty: Some codebase knowledge required. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. T: Refactor Type: Refactor of notable amount of codebase D2: Medium Difficulty: A good amount of codebase knowledge required. labels Apr 23, 2026
@VerinSenpai
Copy link
Copy Markdown
Contributor

Goated work.

@VerinSenpai
Copy link
Copy Markdown
Contributor

Just a thought for the future, maybe having EntityManager provided by HtnPrecondition to dedupe that dependency further? Similar to commands.

@Princess-Cheeseballs
Copy link
Copy Markdown
Member

Just a thought for the future, maybe having EntityManager provided by HtnPrecondition to dedupe that dependency further? Similar to commands.

At that point preconditions should just be entity systems (and they should be)

@VerinSenpai
Copy link
Copy Markdown
Contributor

Just a thought for the future, maybe having EntityManager provided by HtnPrecondition to dedupe that dependency further? Similar to commands.

At that point preconditions should just be entity systems (and they should be)

I wasn't aware that was a possibility :godo:

@jessicamaybe
Copy link
Copy Markdown
Contributor Author

jessicamaybe commented Apr 25, 2026

Just a thought for the future, maybe having EntityManager provided by HtnPrecondition to dedupe that dependency further? Similar to commands.

At that point preconditions should just be entity systems (and they should be)

At some point I plan on migrating preconditions to use EntityCondition, but for now i think this is fine. That's waiting on a few PRs and some other work to make them faster

edit: i replied to the wrong post, you already know this they are your prs

@Princess-Cheeseballs Princess-Cheeseballs self-assigned this Apr 26, 2026
Copy link
Copy Markdown
Member

@Princess-Cheeseballs Princess-Cheeseballs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only one whitespace issue I saw.

@PJBot PJBot added the S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. label Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

D3: Low Difficulty: Some codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/M Denotes a PR that changes 100-999 lines. T: Cleanup Type: Code clean-up, without being a full refactor or feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants