fix: male rangers no longer leak StuddedLegs (#2712)

ShortPants and StuddedLegs both occupy Layer.Pants, so the second EquipItem on a male ranger is refused and its item stays in the world with no parent. Nothing deletes such an item, so every male ranger created leaves one behind in the save.

StuddedLegs already cover the layer and female rangers wear them, so the male ranger now skips the shorts. A test creates and deletes rangers and checks that World.Items does not grow.
This commit is contained in:
Sergi Rosell 2026-10-18 00:17:46 +02:00 • committed by GitHub
parent f4ba6036fe
commit 257b4c8c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,7 +43,6 @@ public partial class HireRanger : BaseHire
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
EquipItem(new Shoes(Utility.RandomNeutralHue()));