Skip to content

Add ModOptions unique to disable undo#15225

Open
Fanfblrik wants to merge 2 commits into
yairm210:masterfrom
Fanfblrik:feature/disable-undo-modoption
Open

Add ModOptions unique to disable undo#15225
Fanfblrik wants to merge 2 commits into
yairm210:masterfrom
Fanfblrik:feature/disable-undo-modoption

Conversation

@Fanfblrik

@Fanfblrik Fanfblrik commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ModOptions unique Disable undo.
  • Disables the in-game Undo button and undo checkpoints.
  • In online multiplayer, also closes the rejoin/reload bypass:
    • Debounced mid-turn upload to the MP server after moves, combat, and unit actions
    • Always download from the server when opening/resuming (never prefer a local mid-turn copy that only matches turn/player)

Example ModOptions.json

{
  "uniques": [
    "Disable undo"
  ]
}

Motivation

Players can undo scout/combat outcomes via Undo, or by rejoining an online game (server usually only updates on end turn). This unique closes both paths for competitive multiplayer.

Test plan

  • Enable an extension mod with Disable undo
  • Offline/single-player: Undo button never appears after a move
  • Online MP + unique: move a unit → wait ~2s → rejoin from multiplayer list → unit is still on the new tile
  • Online MP + unique: Resume/autoload uses server state, not a stale local autosave
  • Without the mod → vanilla Undo / end-turn-only upload behavior

@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Fanfblrik and others added 2 commits July 22, 2026 17:14
Allow mods to turn off in-game undo so multiplayer players cannot reverse moves within a turn.

Co-authored-by: Cursor <cursoragent@cursor.com>
When Disable undo is active in online multiplayer, debounce-upload after actions and always load from the server instead of a local mid-turn copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Fanfblrik
Fanfblrik force-pushed the feature/disable-undo-modoption branch from f9b1d62 to 3d9c0e8 Compare July 22, 2026 14:14
@github-actions

Copy link
Copy Markdown

Conflicts have been resolved.

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.

1 participant