-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Are Techs Components? #2772
Comments
My feeling: based on the re-arch of techs we did in 5.0, it doesn't make sense for Techs to be Components. They have a lot in common but we did intentionally choose not to pass Techs references to the player. |
I'm with @dmlap - things that are the same should be the same, things that are different should be obviously different. |
I agree. Unfortunately, we can't remove Html5 and Flash from the component registration currently because semver. |
I think that makes sense. I guess that means until 6.0, |
we only need to maintain the compat for the built-in techs, Html5 and Flash. So, we could just register both as Techs and Components but have others only register Techs as Techs and not Components. |
I have a PR for this: #2782 |
While working on trying to make a generic solution for #2767 I ran into a problem creating components from a list of names. Namely, there isn't a good way to know whether a component is a component or a tech. There is also (at least) one major difference between the two -- a component takes the
player
andoptions
as arguments but techs takeoptions
andready
as arguments. Meaning that you can initialize a tech and a regular component dynamically the same way.So, the question is whether we should be registering Techs as components or do we need a tech registry?
The text was updated successfully, but these errors were encountered: