mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Displacement maps now works on any layers (#27405)
* try * pipupi * Update ClientClothingSystem.cs * Update vox.yml * Update ClientClothingSystem.cs
This commit is contained in:
parent
599a66230b
commit
f079e77554
4 changed files with 9 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue