fix(inventory): sequence secondary wield blockers

Preserve retail AmmoType from CreateObject and port BlocksUseOfShield so bow, caster, and two-handed switches remove incompatible shields, while mismatched missile ammo is also returned to the pack. Each blocker remains server-confirmed before AutoWield re-enters.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-12 23:12:07 +02:00
parent 17b5712d53
commit 815ce0dec4
14 changed files with 206 additions and 16 deletions

View file

@ -310,6 +310,22 @@ public sealed class ClientObjectTableTests
Assert.Equal("Pyreal Scarabs", table.Get(0x500000B9u)!.GetAppropriateName());
}
[Fact]
public void Ingest_AmmoType_PreservesWireValueForAutoWieldCompatibility()
{
var table = new ClientObjectTable();
table.Ingest(FullWeenie(0x500000BAu, name: "Bow",
type: ItemType.MissileWeapon) with
{
CombatUse = 2,
AmmoType = 1,
});
Assert.Equal((byte)2, table.Get(0x500000BAu)!.CombatUse);
Assert.Equal((ushort)1, table.Get(0x500000BAu)!.AmmoType);
}
[Fact]
public void Ingest_RadarMetadata_PatchesOnlyPresentWireFields()
{