refactor(runtime): own interaction transactions

Move use throttling, appraisal identity, queued interactions, and exact post-arrival pickup state beneath RuntimeActionState. Keep App as the picker, movement, transport, and retained-presentation adapter while preserving retail send and UseDone ordering. Add reset, disposal, GUID-reuse, callback-reentrancy, and transport-failure coverage.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-26 11:13:09 +02:00
parent be73bccf5a
commit f5f7b4177f
31 changed files with 1365 additions and 432 deletions

View file

@ -265,7 +265,7 @@ public class ToolbarControllerTests
var useWithTarget = new List<(uint Source, uint Target)>();
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
@ -332,7 +332,7 @@ public class ToolbarControllerTests
var directPuts = new List<(uint Item, uint Container, int Placement)>();
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
@ -382,7 +382,7 @@ public class ToolbarControllerTests
var messages = new List<string>();
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
@ -512,7 +512,7 @@ public class ToolbarControllerTests
uint selected = item;
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
() => player,
sendUse: uses.Add,
@ -571,7 +571,7 @@ public class ToolbarControllerTests
var selection = new SelectionState();
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
() => player,
sendUse: null,
@ -637,7 +637,7 @@ public class ToolbarControllerTests
var wields = new List<(uint Item, uint Location)>();
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
() => player,
sendUse: null,
@ -804,7 +804,7 @@ public class ToolbarControllerTests
var appraisals = new List<uint>();
using var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
playerGuid: () => player,
sendUse: null,
@ -854,7 +854,7 @@ public class ToolbarControllerTests
uint sentTarget = 0;
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
() => player,
sendUse: null,
@ -897,7 +897,7 @@ public class ToolbarControllerTests
repo.MoveItem(item, pack, 0);
var interaction = new ItemInteractionController(
repo,
new InventoryTransactionState(repo),
new AcDream.Runtime.Gameplay.RuntimeInteractionTransactionState(new InventoryTransactionState(repo)),
new InteractionState(),
() => player,
sendUse: null,