Fashion is my profession - Procedural jumpsuit variants (#25888)
* add color field to clothing layers * add support to randomsprite * bababa * finalize spriting work * add to game * fix * remove space * edit patelle, +1 decor variant * added only pants, some sprite fix * inflation * fix mixed * not tested commit * Revert "not tested commit" This reverts commit 4a904df3452263e87c9cb819ab5d8cf411ebe468. * naked human is fun * update * add new style * some sprite pixel tweak * Update meta.json
This commit is contained in:
@@ -217,5 +217,38 @@ public abstract class ClothingSystem : EntitySystem
|
||||
Dirty(uid, clothing);
|
||||
}
|
||||
|
||||
public void SetLayerColor(ClothingComponent clothing, string slot, string mapKey, Color? color)
|
||||
{
|
||||
if (clothing.ClothingVisuals == null)
|
||||
return;
|
||||
|
||||
foreach (var layer in clothing.ClothingVisuals[slot])
|
||||
{
|
||||
if (layer.MapKeys == null)
|
||||
return;
|
||||
|
||||
if (!layer.MapKeys.Contains(mapKey))
|
||||
continue;
|
||||
|
||||
layer.Color = color;
|
||||
}
|
||||
}
|
||||
public void SetLayerState(ClothingComponent clothing, string slot, string mapKey, string state)
|
||||
{
|
||||
if (clothing.ClothingVisuals == null)
|
||||
return;
|
||||
|
||||
foreach (var layer in clothing.ClothingVisuals[slot])
|
||||
{
|
||||
if (layer.MapKeys == null)
|
||||
return;
|
||||
|
||||
if (!layer.MapKeys.Contains(mapKey))
|
||||
continue;
|
||||
|
||||
layer.State = state;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user