fix(items): port retail useability and autowear rejection

Use the exact low USEABLE_NO-bit predicate so reset/zero-valued direct-use items such as Blackmoor's Favor reach the ordinary Use request. Port AutoWear's clothing-priority blocker lookup and exact named system notice through the shared activation owner.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-23 08:33:31 +02:00
parent 60387668d0
commit f71f947475
13 changed files with 289 additions and 57 deletions

View file

@ -279,6 +279,29 @@ public sealed class WorldSelectionQueryTests
Assert.True(h.Query.IsPickupable(looseComponent));
}
[Fact]
public void UseabilityUsesRetailLowNoBitForAbsentAndExplicitValues()
{
var h = new Harness();
const uint absent = 0x7000_0022u;
const uint zero = 0x7000_0023u;
const uint no = 0x7000_0024u;
const uint neverWalk = 0x7000_0025u;
h.Add(absent, Vector3.UnitX, ItemType.Gem);
h.Add(zero, Vector3.UnitX * 2f, ItemType.Gem, useability: 0u);
h.Add(no, Vector3.UnitX * 3f, ItemType.Gem, useability: ItemUseability.No);
h.Add(
neverWalk,
Vector3.UnitX * 4f,
ItemType.Gem,
useability: ItemUseability.NeverWalk);
Assert.True(h.Query.IsUseable(absent));
Assert.True(h.Query.IsUseable(zero));
Assert.False(h.Query.IsUseable(no));
Assert.True(h.Query.IsUseable(neverWalk));
}
[Fact]
public void SelectionSphereAppliesSetupOffsetScaleAndRotation()
{