Chameleon clothing (#8444)

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Alex Evgrashin
2022-09-14 10:42:14 +02:00
committed by GitHub
parent 54947c137c
commit 9ce3a18e3f
33 changed files with 868 additions and 29 deletions

View File

@@ -52,5 +52,22 @@ public sealed class ClothingSystem : EntitySystem
Dirty(clothing);
}
/// <summary>
/// Copy all clothing specific visuals from another item.
/// </summary>
public void CopyVisuals(EntityUid uid, SharedClothingComponent otherClothing, SharedClothingComponent? clothing = null)
{
if (!Resolve(uid, ref clothing))
return;
clothing.ClothingVisuals = otherClothing.ClothingVisuals;
clothing.EquippedPrefix = otherClothing.EquippedPrefix;
clothing.RsiPath = otherClothing.RsiPath;
clothing.FemaleMask = otherClothing.FemaleMask;
_itemSys.VisualsChanged(uid);
Dirty(clothing);
}
#endregion
}