Skip to content

v1.1.0: Adds turn history and improves notifications

Choose a tag to compare

@Azazel666 Azazel666 released this 21 Dec 13:31
· 3 commits to main since this release

[1.1.0]

Added

  • Go Back Button (GM only): New button in turn order panel to undo turn advancement
    • Only visible and enabled for GM
    • Disabled when no turn history is available
    • Restores previous turn state including round number, delayed tokens, and turn index
  • Turn History Tracking: Complete state history for undo functionality
    • Tracks index, round, delayed tokens, and delayed-this-round state
    • History saved before each turn advance or delay action
    • History cleared when turn order is reset or TBM is disabled
    • Prevents going back before any turns have been passed

Changed

  • Notification System Improvements:
    • Removed "Pass turn request sent..." notification (silent action)
    • Removed "Delay turn request sent..." notification (silent action)
    • Fixed duplicate "It's your turn" / "You're up next" messages
    • Notifications only trigger when turn index or round actually changes
    • Token name only shown in notifications when player controls multiple tokens
    • Added state tracking to prevent duplicate announcements

Fixed

  • Turn Order Filtering: Only tokens with player ownership are added to turn order
    • GM-only tokens are excluded from turn order
    • Unowned tokens are excluded from turn order
    • Uses actor.hasPlayerOwner check to determine eligibility
  • Panel Position Persistence: Turn order panel now remembers position per-user
    • Position saved to user flags when dragging ends
    • Position restored when TBM is re-enabled
    • Each user (GM and players) can have their own panel position
    • Position persists across TBM enable/disable cycles
  • Duplicate Notifications: Players no longer receive multiple copies of the same turn notification
    • Added state hash tracking (round-index) to prevent duplicates
    • announceCurrentTurn() only called when currentIndex or currentRound flags change
    • Prevents showing both "You're up next" and "It's your turn" when turn advances
  • Notification Spam: Reduced unnecessary notification messages during turn advancement

Technical Changes

  • Added TURN_HISTORY scene flag for undo functionality
  • Added PANEL_POSITION user flag for per-user panel positioning
  • Added _lastAnnouncedState static property to track announcement state
  • Modified nextTurn() and processDelayTurn() to save state before advancing
  • Added getTurnHistory() method for history retrieval
  • Improved updateScene hook to filter announcements by flag changes
  • Enhanced previousTurn() with complete state restoration logic