Skip to content

Skip empty Turn Lists in the Turn Counter#14483

Open
rlament wants to merge 1 commit intovassalengine:masterfrom
rlament:14471-listTurnLevel
Open

Skip empty Turn Lists in the Turn Counter#14483
rlament wants to merge 1 commit intovassalengine:masterfrom
rlament:14471-listTurnLevel

Conversation

@rlament
Copy link
Copy Markdown
Contributor

@rlament rlament commented Feb 7, 2026

Module designers can unintentionally or intentionally add an empty Turn List sub-component to a Turn Counter button. A new Turn List initializes as empty by default with no levels.

This PR adds handling of empty turn lists. The turn tracker should not throw exceptions on empty lists when advancing to the next or previous list item. For any list without defined levels or sub-levels, the turn counter skips over those empty turn lists.

Closes #14471

Module designers can unintentionally or intentionally add an empty list turn
object to the turn tracker. The item list initializes as empty by default.
The turn tracker should not throw exceptions on empty lists.
Since the list has no levels, the turn counter skips over empty turn lists.
@uckelman uckelman modified the milestone: 3.7.22 Apr 23, 2026
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.

[Third Reich 4th edition] ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

2 participants