add the ability to override the equipped state sprite clothing system uses for custom prototypes. (#15294)

This commit is contained in:
Zoldorf
2023-04-11 10:28:56 -06:00
committed by GitHub
parent 33c34bda13
commit 8400ed7fbb
2 changed files with 18 additions and 3 deletions

View File

@@ -142,9 +142,15 @@ public sealed class ClientClothingSystem : ClothingSystem
var correctedSlot = slot;
TemporarySlotMap.TryGetValue(correctedSlot, out correctedSlot);
var state = (clothing.EquippedPrefix == null)
? $"equipped-{correctedSlot}"
: $"{clothing.EquippedPrefix}-equipped-{correctedSlot}";
var state = $"equipped-{correctedSlot}";
if (clothing.EquippedPrefix != null)
state = $"{clothing.EquippedPrefix}-equipped-{correctedSlot}";
if (clothing.EquippedState != null)
state = $"{clothing.EquippedState}";
// species specific
if (speciesId != null && rsi.TryGetState($"{state}-{speciesId}", out _))