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

FOW functions: add "mapname" as valid argument #505

Closed
Merudo opened this issue Jul 26, 2019 · 4 comments
Closed

FOW functions: add "mapname" as valid argument #505

Merudo opened this issue Jul 26, 2019 · 4 comments
Assignees
Labels
feature Adding functionality that adds value macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.

Comments

@Merudo
Copy link
Member

Merudo commented Jul 26, 2019

Is your feature request related to a problem? Please describe.
The code in FogOfWarFunctions.java makes it clear that all FOW functions are intended to take "mapname" as an argument, but the feature is not available for some FOW functions because of a bug.

Describe the solution you'd like
Fix the bug and allow the argument "mapname" to work as intended.

Additional context

The bug can be fixed by replacing

private Set<GUID> getTokenSelectedSet(final ZoneRenderer zr) {
    Set<GUID> tokens = MapTool.getFrame().getCurrentZoneRenderer().getSelectedTokenSet();
    Set<GUID> ownedTokens = MapTool.getFrame().getCurrentZoneRenderer().getOwnedTokens(tokens);
    return ownedTokens;
 }

by

private Set<GUID> getTokenSelectedSet(final ZoneRenderer zr) {
    Set<GUID> tokens = zr.getSelectedTokenSet();
    Set<GUID> ownedTokens = zr.getOwnedTokens(tokens);
    return ownedTokens;
  }

in FogOfWarFunctions.java

@Phergus Phergus added the feature Adding functionality that adds value label Jul 26, 2019
@Phergus Phergus added in progress Issue is actively being worked on macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) labels Jul 27, 2019
@Phergus
Copy link
Contributor

Phergus commented Jul 29, 2019

In the description you said "some FoW functions" which implies more than one. The PR #506 specifically calls out exposeFOW(). Are there other functions that were impacted and, if so, which ones?

@Merudo
Copy link
Member Author

Merudo commented Aug 1, 2019

No other functions were impacted by my commits.

exposePCOnlyArea() and exposeAllOwnedArea() are known to take mapname as arguments.

restoreFoW() already has mapname as an argument, even though the wiki doesn't report it.

Only toggleFoW() and exposeFogAtWaypoints() do not take mapname as argument, but it would require a different approach to fix these.

@Phergus
Copy link
Contributor

Phergus commented Aug 1, 2019

exposeFoW() wiki entry updated.
restoreFoW() wiki entry updated.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Aug 12, 2019
@Phergus
Copy link
Contributor

Phergus commented Aug 12, 2019

Tested exposeFoW() and restoreFoW(). Closing

@Phergus Phergus closed this as completed Aug 12, 2019
@Phergus Phergus removed the in progress Issue is actively being worked on label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

No branches or pull requests

2 participants