Skip to content
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

refactor EntitySystem proxy into its own class, give proxy to BUIs #5561

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

deltanedas
Copy link
Contributor

  • replaced EntitySystem.Proxy.cs with abstract class EntManProxy, and moved RaiseLocalEvent etc to it as well
  • this is inherited by EntitySystem and BoundUserInterface, you can now do TryComp and stuff in BUIs
  • PlayerManager is also protected so systems can stop adding it as dependency
  • anything in content can use it too with IoCManager.InjectDependencies(this); and it just works, as long as there is no other parent class. BUI and EntitySystem had no base class so it works for them

no breaking changes, BUI still has EntMan to get the entity manager so code doesnt need changing

@deltanedas
Copy link
Contributor Author

unless this could cause performance issues somehow pls merge 🙏

Copy link
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

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

Yeah I'm not a fan of this approach. If BUIs need to be able to access these, I think it would be better if BUIs somehow became a subtype of EntitySystem instead.

@deltanedas
Copy link
Contributor Author

not just buis need this, things like entity effects are ugly because they cant use proxy

@PJB3005
Copy link
Member

PJB3005 commented Jan 7, 2025

not just buis need this, things like entity effects are ugly because they cant use proxy

Aren't those also things that really should be entity systems instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants