-
Notifications
You must be signed in to change notification settings - Fork 835
Add console command to reveal cave and dungeon names #9495
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
base: master
Are you sure you want to change the base?
Conversation
forge-gui-mobile/src/forge/adventure/stage/ConsoleCommandInterpreter.java
Outdated
Show resolved
Hide resolved
| return "Please specify at least one PointOfInterest type (e.g. \"reveal cave\", \"reveal dungeon\", \"reveal town\", \"reveal capital\")."; | ||
| } | ||
| int revealed = 0; | ||
| for (PointOfInterest poi : save.getWorld().getAllPointOfInterest()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's currently iterating over every POI, regardless of if it matches the type passed in. Could enhance performance by filtering these down to just the ones that match the passed in type(s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can refactor this for readability, but that won’t change performance: we still need to inspect all POIs at least once without a precomputed type index. To actually reduce iteration cost, we’d need to add a typed lookup/index in world POI storage, which is a larger design change. If that already exists and I missed it, please let me know.
Summary
reveal caves dungeons.