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

A way for a Enum property to express to struct inflater a property that's not tied to a struct tag #773

Open
jkomoros opened this issue Jul 30, 2020 · 0 comments

Comments

@jkomoros
Copy link
Owner

For example, the behaviors.Color hard-codes that the enum is Color. Ideally you could have some way for a struct inflater to inspect the field and get more information about it, and that information could be plumbed in from elsewhere. (Note: things are passed to NewStructInflater when they aren't even part of an exampleState, so you'd need to figure out where to stick them). This could allow you to have different enums used.

It could also allow a behavior.ProposedEnum that could be set to a specific enum live, and not hard-coded within the behavior. (But then you could only have one enum taht could be proposed by the player).

Perhaps the mechanism is as simple as a struct tag on the behavior that can be inspected by struct inflater, not just the leaf property.

Thought of while thinking about #752

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

No branches or pull requests

1 participant