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:
parent
60387668d0
commit
f71f947475
13 changed files with 289 additions and 57 deletions
|
|
@ -28,6 +28,23 @@ public sealed class ItemUseabilityTests
|
|||
Assert.False(ItemUseability.IsDirectUseable(ItemUseability.No));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ItemUseability.Undef, true)]
|
||||
[InlineData(ItemUseability.No, false)]
|
||||
[InlineData(ItemUseability.Contained, true)]
|
||||
[InlineData(ItemUseability.NeverWalk, true)]
|
||||
[InlineData(ItemUseability.No | ItemUseability.Contained, false)]
|
||||
public void IsUseable_matchesRetailLowNoBit(uint useability, bool expected)
|
||||
{
|
||||
Assert.Equal(expected, ItemUseability.IsUseable(useability));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Undef_isAZeroValuedDirectUse()
|
||||
{
|
||||
Assert.True(ItemUseability.IsDirectUseable(ItemUseability.Undef));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LeastLimitedSourceUse_matchesRetailPriorityAndIgnoresObjSelf()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue