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

Ability to get all Components that extend from a base component (Polymorphism) #38

Closed
Felyrun opened this issue Jan 9, 2022 · 1 comment
Labels
domain: components Related to the Components flamework module enhancement New feature or request

Comments

@Felyrun
Copy link

Felyrun commented Jan 9, 2022

(Kind of related to #33, but also different)

Currently, there is no possibility to retrieve all components that extend from a base component, which would be a great feature for writing decoupled code.

For example, I have different types of Interaction Classes for things like Seats or Heal Stations, that all derive from a BaseInteraction Class for common functionality. Then, I have a GUI to display an interaction prompt on all of these. Currently, I have to call getAllComponents() for each of these Interaction Classes manually (Which also means I have to reference them), instead of using one getAllComponents() call that supports Polymorphism.

I know that could be hard to implement as these types don't really exist on runtime, but I could imagine something like this working through the metadata that Flamework defines for each Component.

@Fireboltofdeath Fireboltofdeath added enhancement New feature or request domain: components Related to the Components flamework module labels Jan 10, 2022
@Fireboltofdeath
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: components Related to the Components flamework module enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants