refactor(input): own gameplay action routing

Move the sole semantic action-priority graph, combat and diagnostic commands, and retained-root item-drop lifetime behind focused typed owners. Preserve retail toggle behavior, explicit auto-wield cancellation, shutdown quiescence, and symmetric callback cleanup.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 12:43:05 +02:00
parent 8b8afeefa3
commit 4eae9b4f5a
25 changed files with 2608 additions and 418 deletions

View file

@ -3,6 +3,8 @@
## Sources
- `ClientCombatSystem::GetDefaultCombatMode @ 0x0056B310`
- `ClientCombatSystem::SetCombatMode @ 0x0056BE30`
- `ClientCombatSystem::ToggleCombatMode @ 0x0056C8C0`
- `ACCWeenieObject::GetObjectAtLocation @ 0x0058CE00`
- `CM_Physics::DispatchSB_ParentEvent @ 0x006ACAF0`
- `SmartBox::HandleParentEvent @ 0x004535D0`
@ -52,10 +54,28 @@ GetDefaultCombatMode(showError):
return Magic
if showError == false:
print the retail cannot-use-held-item notice
print "You can't enter combat mode while wielding the %s"
formatted with held.GetObjectName(NAME_APPROPRIATE)
return NonCombat
```
`ToggleCombatMode` preserves that rejected result verbatim:
```text
ToggleCombatMode():
if current combat mode != NonCombat:
SetCombatMode(NonCombat, send = true)
return
requested = GetDefaultCombatMode(showError = false)
SetCombatMode(requested, send = true)
```
`SetCombatMode` immediately returns when `requested == current`. Therefore an
incompatible Held object prints the notice in `GetDefaultCombatMode`, returns
`NonCombat`, and produces no wire request or local mode transition. It is not
coerced to unarmed Melee.
`GetObjectAtLocation` walks the player's ordered inventory-placement list and
returns the first entry whose location intersects the requested mask (and whose
priority intersects the requested priority when that priority is non-zero).