Displacement maps now works on any layers (#27405)
* try * pipupi * Update ClientClothingSystem.cs * Update vox.yml * Update ClientClothingSystem.cs
This commit is contained in:
@@ -307,13 +307,16 @@ public sealed class ClientClothingSystem : ClothingSystem
|
||||
// Sprite layer redactor when
|
||||
// Sprite "redactor" just a week away.
|
||||
if (slot == Jumpsuit)
|
||||
layerData.Shader ??= inventory.JumpsuitShader;
|
||||
layerData.Shader ??= "StencilDraw";
|
||||
|
||||
sprite.LayerSetData(index, layerData);
|
||||
layer.Offset += slotDef.Offset;
|
||||
|
||||
if (displacementData != null)
|
||||
{
|
||||
if (displacementData.ShaderOverride != null)
|
||||
sprite.LayerSetShader(index, displacementData.ShaderOverride);
|
||||
|
||||
var displacementKey = $"{key}-displacement";
|
||||
if (!revealedLayers.Add(displacementKey))
|
||||
{
|
||||
|
||||
@@ -13,7 +13,6 @@ public sealed partial class InventoryComponent : Component
|
||||
|
||||
[DataField("speciesId")] public string? SpeciesId { get; set; }
|
||||
|
||||
[DataField] public string JumpsuitShader = "StencilDraw";
|
||||
[DataField] public Dictionary<string, SlotDisplacementData> Displacements = [];
|
||||
|
||||
public SlotDefinition[] Slots = Array.Empty<SlotDefinition>();
|
||||
@@ -24,5 +23,8 @@ public sealed partial class InventoryComponent : Component
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public PrototypeLayerData Layer = default!;
|
||||
|
||||
[DataField]
|
||||
public string? ShaderOverride = "DisplacedStencilDraw";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- type: entity
|
||||
save: false
|
||||
name: Vox
|
||||
name: Urist McVox
|
||||
parent: BaseMobVox
|
||||
id: MobVox
|
||||
id: MobVox
|
||||
@@ -16,7 +16,6 @@
|
||||
#- type: VoxAccent # Not yet coded
|
||||
- type: Inventory
|
||||
speciesId: vox
|
||||
jumpsuitShader: DisplacedStencilDraw
|
||||
displacements:
|
||||
jumpsuit:
|
||||
layer:
|
||||
|
||||
Reference in New Issue
Block a user