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

Give edit systems access to the level index #10

Closed
idanarye opened this issue Jun 9, 2022 · 2 comments
Closed

Give edit systems access to the level index #10

idanarye opened this issue Jun 9, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@idanarye
Copy link
Owner

idanarye commented Jun 9, 2022

Most straightforward way - make it a resource.

The idea is to allow levels to refer other levels. For example - a door entity can have a field with the name of another level that door leads to.

@idanarye idanarye added the enhancement New feature or request label Jun 9, 2022
@idanarye
Copy link
Owner Author

I'm not sure I want the actual level index itself exposed (since I want to eventually remove it in favor of #34), but it'd probably be a good idea to expose a BTreeMap of the level files paths.

  • Why tree and not hash? Because they will be displayed in dropdown combo boxes, so I don't want a changing order - and a lexical order would actually be useful. I also don't want users to rely on the order from the level index.
  • Why map and not set? So that later on I can put data in the values, for edit systems to rely on.

@idanarye
Copy link
Owner Author

Actually, I'll just start with a BTreeSet but keep it encapsulated for now, so that the only interface will be YoleckEditableLevels::paths() (and YoleckEditableLevels::contains())

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

No branches or pull requests

1 participant