feat: add exact player context actions

This commit is contained in:
Rijad Zuzo
2026-07-30 23:27:46 +02:00
parent d950c3da68
commit 7d410d8193
12 changed files with 762 additions and 67 deletions
+15
View File
@@ -149,6 +149,21 @@ These collaborators are `RefCounted` rule services, not additional scene-tree
managers. Further decomposition should follow measured pressure and a proven
gameplay consumer.
## Player context-interaction contract
`Player.get_interaction_context()` derives one ephemeral
`PlayerInteractionResult` in the same priority order used by `E`: hungry
animal, usable finite resource, guard site, study site, then pantry. The result
contains the exact stable target ID, action, display name, prompt copy,
availability, and loaded target reference. `try_interact()` executes that
single resolved result rather than maintaining a second target map.
`PlayerInteractionHud` formats the result and transient outcome feedback. It
does not select targets, mutate simulation state, or enter the save record.
State restore clears active feedback and re-derives the prompt from current
simulation and loaded-world facts. The HUD is separate from development
overlays so the embodied action remains legible in cinematic mode.
## Active-position contract
NpcVisual emits active position changes after successful movement.