Skip to content

Refactor ComponentRegistry to encourage correct usage.#6442

Open
moonheart08 wants to merge 24 commits intospace-wizards:masterfrom
moonheart08:09-03-2026-component-registry-refactor
Open

Refactor ComponentRegistry to encourage correct usage.#6442
moonheart08 wants to merge 24 commits intospace-wizards:masterfrom
moonheart08:09-03-2026-component-registry-refactor

Conversation

@moonheart08
Copy link
Contributor

@moonheart08 moonheart08 commented Mar 9, 2026

This removes all of the API surface that exposed ComponentRegistry as a dictionary, leaving the remaining necessary surface [Obsolete].

This also simplifies certain common usecases for ComponentRegistry, and pushes the user toward not using it as a filter list.

This also adds ComponentFilter, a (much more ergonomic) replacement for the ComponentRegistry-as-filters misuse.

Resolves #6440 as much as possible while requiring minimal content PRs. Further content PRs are part 2.

@moonheart08 moonheart08 marked this pull request as ready for review March 10, 2026 12:23
@moonheart08 moonheart08 force-pushed the 09-03-2026-component-registry-refactor branch from 8e80522 to 93e4cbf Compare March 10, 2026 13:19
@slarticodefast
Copy link
Member

Blessed PR.
Resolves #5709

@moonheart08
Copy link
Contributor Author

Remark: ComponentFilterQuery should just be rewritten to use DynamicEntityQuery from my other PR, but I don't want to merge these two for review reasons atm.

When someone judges these ready for merge, let me know and I'll just merge the two PRs into one so I can do that rewrite.

@Tayrtahn Tayrtahn added T: Refactor Type: Code refactor A: Serialization A: ECS Core functionality for the ECS labels Mar 15, 2026
@moonheart08 moonheart08 mentioned this pull request Mar 15, 2026
@moonheart08 moonheart08 force-pushed the 09-03-2026-component-registry-refactor branch from 8aad3dd to 3fa6786 Compare March 17, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: ECS Core functionality for the ECS A: Serialization T: Refactor Type: Code refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find and remove all ComponentRegistry misuse.

3 participants