Skip to content

Add restrictRange attribute to DeckGlobalKeyCommand#14300

Open
gantoin wants to merge 1 commit intovassalengine:masterfrom
gantoin:master
Open

Add restrictRange attribute to DeckGlobalKeyCommand#14300
gantoin wants to merge 1 commit intovassalengine:masterfrom
gantoin:master

Conversation

@gantoin
Copy link
Copy Markdown

@gantoin gantoin commented Oct 17, 2025

Related to #13018

Comment on lines +329 to +331
else {
return new NullCommand();
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this 'else' block be deleted? It seems that decks may not necessarily have an associated map. In that case shouldn't this function continue with the original behavior and apply only to pieces in the deck. In other words, not return here.

Editor.DeckGlobalKeyCommand.command=Global Command
Editor.DeckGlobalKeyCommand.matching_properties=Matching expression
Editor.DeckGlobalKeyCommand.affects=Affects
Editor.DeckGlobalKeyCommand.restrict_range=Restrict to pieces in Deck
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Apply" is the word associated with Global Key Commands. "Restrict" could be confused with the "Restrict..." traits. Take a look at Editor.MassKey.deck_content. Something like Apply only to contents of Decks may be more explanatory and inline with the existing terminology. However this doesn't indicate to the user that the Global Key Command applies to all pieces on the map when unchecked. Naming is hard.

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

Successfully merging this pull request may close these issues.

2 participants