refactor(runtime): close canonical gameplay ownership

Unify the toolbar shortcut manager with Runtime inventory state, route retail-ordered shortcut and spellbook command effects through the canonical owners, and make retained controllers borrow those exact instances. Remove the item-interaction transaction fallback and add graphical/no-window parity plus failure-safe terminal ownership-ledger coverage.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-26 09:48:51 +02:00
parent ce6fae7b38
commit 89e6b207f8
36 changed files with 1433 additions and 251 deletions

View file

@ -508,6 +508,7 @@ public class InventoryControllerTests
var appraisals = new List<uint>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -544,6 +545,7 @@ public class InventoryControllerTests
objects.Get(0xA)!.Useability = 0x000A0008u;
var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -712,6 +714,7 @@ public class InventoryControllerTests
var pickups = new List<(uint item, uint container, int placement)>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -756,6 +759,7 @@ public class InventoryControllerTests
var eventOrder = new List<(string Kind, uint Item, ulong Token)>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -807,6 +811,7 @@ public class InventoryControllerTests
var eventOrder = new List<(string Kind, uint Item)>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -864,6 +869,7 @@ public class InventoryControllerTests
var messages = new List<string>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -932,6 +938,7 @@ public class InventoryControllerTests
var messages = new List<string>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -994,6 +1001,7 @@ public class InventoryControllerTests
var merges = new List<(uint Source, uint Target, uint Amount)>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -1053,6 +1061,7 @@ public class InventoryControllerTests
var splits = new List<(uint Item, uint Container, uint Placement, uint Amount)>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -1099,6 +1108,7 @@ public class InventoryControllerTests
var puts = new List<(uint Item, uint Container, int Placement)>();
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -1138,6 +1148,7 @@ public class InventoryControllerTests
SeedContained(objects, loot, chest, slot: 0, type: ItemType.Misc);
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,
@ -1176,6 +1187,7 @@ public class InventoryControllerTests
SeedContained(objects, loot, chest, slot: 0, type: ItemType.Misc);
using var interaction = new ItemInteractionController(
objects,
new InventoryTransactionState(objects),
playerGuid: () => Player,
sendUse: null,
sendUseWithTarget: null,