refactor(runtime): own canonical action state

Move selection, combat, and interaction target mode under one Runtime owner; make plugins, retained UI, session routing, and typed runtime views borrow its exact children; and add failure-safe reset, instance isolation, source ownership, and normalized checkpoint coverage without changing retail ordering.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-26 10:44:09 +02:00
parent bb45afef33
commit b298f99f91
38 changed files with 711 additions and 93 deletions

View file

@ -266,6 +266,7 @@ public class ToolbarControllerTests
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
sendUseWithTarget: (source, target) => useWithTarget.Add((source, target)),
@ -332,6 +333,7 @@ public class ToolbarControllerTests
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
sendUseWithTarget: null,
@ -381,6 +383,7 @@ public class ToolbarControllerTests
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
sendUseWithTarget: null,
@ -510,6 +513,7 @@ public class ToolbarControllerTests
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
() => player,
sendUse: uses.Add,
sendUseWithTarget: null,
@ -568,6 +572,7 @@ public class ToolbarControllerTests
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
() => player,
sendUse: null,
sendUseWithTarget: null,
@ -633,6 +638,7 @@ public class ToolbarControllerTests
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
() => player,
sendUse: null,
sendUseWithTarget: null,
@ -799,6 +805,7 @@ public class ToolbarControllerTests
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
sendUseWithTarget: null,
@ -848,6 +855,7 @@ public class ToolbarControllerTests
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
() => player,
sendUse: null,
sendUseWithTarget: (s, t) => (sentSource, sentTarget) = (s, t),
@ -890,6 +898,7 @@ public class ToolbarControllerTests
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new InteractionState(),
() => player,
sendUse: null,
sendUseWithTarget: null,