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

12544 - Hot-seat support - ability to specify default side #12646

Closed

Conversation

riverwanderer
Copy link
Collaborator

@riverwanderer riverwanderer commented Sep 4, 2023

First effort at providing a hotseat over-ride, addressing issue #12544.

If property VassalNextSide is defined, that will be used.

…l Property VassalNextSide. The GP may be defined as a Preferences string property (on a blank tab to keep it hidden), in which case the VassalNextSide will take effect a per-player level.
…l Property VassalNextSide. The GP may be defined as a Preferences string property (on a blank tab to keep it hidden), in which case the VassalNextSide will take effect a per-player level.
…l Property VassalNextSide. The GP may be defined as a Preferences string property (on a blank tab to keep it hidden), in which case the VassalNextSide will take effect a per-player level.
…l Property VassalNextSide. The GP may be defined as a Preferences string property (on a blank tab to keep it hidden), in which case the VassalNextSide will take effect a per-player level.
@riverwanderer
Copy link
Collaborator Author

riverwanderer commented Sep 4, 2023

Bug to fix (occurs when VassalNextSide is not defined):

023-09-04 17:29:31,915 [14777-AWT-EventQueue-0] ERROR VASSAL.tools.ErrorDialog - 
java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because "nextChoice" is null
	at VASSAL.build.module.PlayerRoster.promptForSide(PlayerRoster.java:780)

Also, on second thoughts, it will not be sensible to set this property locally, as then any given module that uses the feature will not be able to provide a hotseat function that works for both solo and multiplayer modes.

@riverwanderer
Copy link
Collaborator Author

Retested successfully with standard hotseat side-switching and with the VassalNextSide over-ride feature.
Vassal Reference Manual update to follow.

@riverwanderer riverwanderer requested review from Cattlesquat and removed request for Cattlesquat September 4, 2023 21:51
@riverwanderer riverwanderer added Ready for Review Ready to be reviewed for Merging enhancement New feature or request labels Sep 4, 2023
@riverwanderer riverwanderer changed the title 12544 next side choice 12544 Next side choice Sep 4, 2023
@riverwanderer riverwanderer changed the title 12544 Next side choice Hot-seat support - ability to specifiy default side Sep 4, 2023
@riverwanderer riverwanderer changed the title Hot-seat support - ability to specifiy default side 12544. - Hot-seat support - ability to specifiy default side Sep 4, 2023
@riverwanderer riverwanderer changed the title 12544. - Hot-seat support - ability to specifiy default side 12544 - Hot-seat support - ability to specifiy default side Sep 4, 2023
@riverwanderer riverwanderer added this to the 3.7.0 milestone Sep 4, 2023
@riverwanderer riverwanderer changed the title 12544 - Hot-seat support - ability to specifiy default side 12544 - Hot-seat support - ability to specify default side Sep 6, 2023
@uckelman uckelman modified the milestones: 3.7.0, 3.8.0 Sep 7, 2023
@riverwanderer riverwanderer removed the Review-In Progress Review is in progress label Sep 14, 2023
@riverwanderer
Copy link
Collaborator Author

This PR doesn't create any v3.7 conflicts, can it be re-classified for the 3.7.1 milestone?

@riverwanderer riverwanderer added Conflicts Has Conflicts with master that need to be resolved and removed Ready for Review Ready to be reviewed for Merging Review-Changes Requested Reviewer has request changes labels Sep 20, 2023
@riverwanderer
Copy link
Collaborator Author

Merged and re-tested OK. Reference Manual update included.

Note that this change should have no effect on modules unless the designer opts-in by defining the controlling global property VassalNextSide.

@riverwanderer riverwanderer added Ready for Review Ready to be reviewed for Merging and removed Conflicts Has Conflicts with master that need to be resolved labels Sep 20, 2023
@riverwanderer riverwanderer modified the milestones: 3.8.0, 3.7.1 Sep 20, 2023
@riverwanderer riverwanderer self-assigned this Sep 20, 2023
@uckelman uckelman modified the milestones: 3.7.1, 3.7.2 Sep 20, 2023
@riverwanderer
Copy link
Collaborator Author

PR superseded by #12732.

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

Successfully merging this pull request may close these issues.

Allow module control over Side Switcher "nextChoice"
4 participants