Skip to content

[FEATURE] Abstract Statics Access #195

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

Open
wants to merge 1 commit into
base: experiment/static-fields
Choose a base branch
from

Conversation

lemz1
Copy link

@lemz1 lemz1 commented Feb 22, 2025

(Renamed the branch, which forced me to reopen the pr?)

DESCRIPTION

This pr adds the ability to access the static members of abstracts.

NOTE

FlxColor is the only thing that has been tested, so I don't know if other abstracts work.

EXPLANATION

We loop through all existing abstracts, and get the variables.

To filter out non static member variables, I have decided to exclude any variable that has a getter or setter. I don't like doing it this way, but I haven't found a better way yet.

Then we define a class that contains getters that return the value of the static in the abstract. The reason we do this, is because abstract static member variables aren't stored in the reflection table.

@KoloInDaCrib
Copy link

(Renamed the branch, which forced me to reopen the pr?)

iirc the logic behind renaming a branch is

  1. create a new branch with a desired name
  2. move changes from the old one
  3. delete the older branch (and with that close the prs associated with it)

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