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

Use the term "NPCs" in the Map Explorer window #4393

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class TokenPanelTreeModel implements TreeModel {

private static final Logger log = LogManager.getLogger(TokenPanelTreeModel.class);

private static final String _TOKENS = "panel.MapExplorer.View.TOKENS";
private static final String _NPCS = "panel.MapExplorer.View.NPCS";
private static final String _PLAYERS = "panel.MapExplorer.View.PLAYERS";
private static final String _GROUPS = "panel.MapExplorer.View.GROUPS";
private static final String _GM = "panel.MapExplorer.View.GM";
Expand All @@ -59,7 +59,7 @@ public class TokenPanelTreeModel implements TreeModel {
public enum View {
// @formatter:off
// I18N key Zone.Layer Req'd? isAdmin?
TOKENS(_TOKENS, Zone.Layer.TOKEN, false, false),
NPCS(_NPCS, Zone.Layer.TOKEN, false, false),
PLAYERS(_PLAYERS, Zone.Layer.TOKEN, false, false),
GROUPS(_GROUPS, Zone.Layer.TOKEN, false, false),
GM(_GM, Zone.Layer.GM, false, true),
Expand Down Expand Up @@ -116,8 +116,8 @@ public TokenPanelTreeModel(JTree tree) {
// It would be useful to have this list be static, but it's really not that big of a memory
// footprint
// TODO: refactor to more tightly couple the View enum and the corresponding filter
filterList.add(new TokenTokenFilter());
filterList.add(new PlayerTokenFilter());
filterList.add(new NPCTokenFilter());
filterList.add(new GMFilter());
filterList.add(new ObjectFilter());
filterList.add(new BackgroundFilter());
Expand Down Expand Up @@ -264,7 +264,7 @@ private void updateInternal() {
this,
new Object[] {getRoot()},
new int[] {currentViewList.size() - 1},
new Object[] {View.TOKENS}));
new Object[] {View.NPCS}));
// @formatter:on
while (expandedPaths != null && expandedPaths.hasMoreElements()) {
tree.expandPath(expandedPaths.nextElement());
Expand Down Expand Up @@ -408,10 +408,10 @@ protected boolean accept(Token token) {
* <li>Otherwise, return true.
* </ol>
*/
private class TokenTokenFilter extends TokenFilter {
private class NPCTokenFilter extends TokenFilter {
/** Accepts only NPC tokens (GM) or tokens owned by current player. */
public TokenTokenFilter() {
super(View.TOKENS);
public NPCTokenFilter() {
super(View.NPCS);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ panel.MapExplorer.View.GROUPS = Groups
panel.MapExplorer.View.LIGHT_SOURCES = Light Sources
panel.MapExplorer.View.OBJECTS = Objects
panel.MapExplorer.View.PLAYERS = Players
panel.MapExplorer.View.TOKENS = Tokens
panel.MapExplorer.View.NPCS = NPCs
panel.NewGroupName = New Group Name
panel.Selected = Selected
panel.Selected.description = Dockable window showing the macros on the currently selected token(s).
Expand Down
Loading