feat(ui): drive toolbar use state from selection
Port the retail selected-object availability predicate into Core and project it through the shared interaction owner. The imported hand now follows canonical selection/object notices, keeps weapon and targeted-tool activation on the existing wield/use cursor paths, and ghosts empty or explicitly unusable selections per the connected UX requirement. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
0134122c28
commit
60387668d0
11 changed files with 269 additions and 16 deletions
|
|
@ -7,6 +7,28 @@ public sealed class ItemInteractionPolicyTests
|
|||
private const uint Player = 0x50000001u;
|
||||
private const uint GroundContainer = 0x70000001u;
|
||||
|
||||
[Fact]
|
||||
public void ToolbarUseEnabled_matchesRetailSelectionPredicate()
|
||||
{
|
||||
Assert.True(ItemInteractionPolicy.IsToolbarUseEnabled(
|
||||
ItemType.MeleeWeapon,
|
||||
combatUse: 1,
|
||||
useability: ItemUseability.No));
|
||||
Assert.True(ItemInteractionPolicy.IsToolbarUseEnabled(
|
||||
ItemType.Armor | ItemType.Clothing,
|
||||
combatUse: 0,
|
||||
useability: ItemUseability.No));
|
||||
Assert.True(ItemInteractionPolicy.IsToolbarUseEnabled(
|
||||
ItemType.Misc,
|
||||
combatUse: 0,
|
||||
useability: 0x00220008u));
|
||||
|
||||
Assert.False(ItemInteractionPolicy.IsToolbarUseEnabled(
|
||||
ItemType.SpellComponents,
|
||||
combatUse: 0,
|
||||
useability: ItemUseability.No));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DetermineUseResult_looseItemAndComponentPack_matchRetailPickupBranch()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue