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:
Ed
2024-03-15 10:37:12 +03:00
committed by GitHub
parent 3c814f4652
commit 986ac589b4
46 changed files with 412 additions and 44 deletions

View File

@@ -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
}