Displacement maps big update (#30093)

* split logic into own system

* add support for different size displacement maps

* some clothes may not use displacement maps

* displacement maps spport hand sprites

* Update DisplacementMapSystem.cs

* rename things

* fuck stencilmask

* fix bugs

* no masks

* Update jumpsuits.yml

* fix species specific sprites

* Update ClothingSystem.cs

* shoes + ears displacement, some bugfix

* Update DisplacementMapSystem.cs
This commit is contained in:
Ed
2024-07-23 12:04:09 +03:00
committed by GitHub
parent 4ff34458cf
commit 918709cb47
26 changed files with 352 additions and 228 deletions

View File

@@ -1,10 +1,12 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
using Content.Client.DisplacementMap;
using Content.Client.Inventory; using Content.Client.Inventory;
using Content.Shared.Clothing; using Content.Shared.Clothing;
using Content.Shared.Clothing.Components; using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems; using Content.Shared.Clothing.EntitySystems;
using Content.Shared.DisplacementMap;
using Content.Shared.Humanoid; using Content.Shared.Humanoid;
using Content.Shared.Inventory; using Content.Shared.Inventory;
using Content.Shared.Inventory.Events; using Content.Shared.Inventory.Events;
@@ -50,6 +52,7 @@ public sealed class ClientClothingSystem : ClothingSystem
[Dependency] private readonly IResourceCache _cache = default!; [Dependency] private readonly IResourceCache _cache = default!;
[Dependency] private readonly ISerializationManager _serialization = default!; [Dependency] private readonly ISerializationManager _serialization = default!;
[Dependency] private readonly InventorySystem _inventorySystem = default!; [Dependency] private readonly InventorySystem _inventorySystem = default!;
[Dependency] private readonly DisplacementMapSystem _displacement = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -64,15 +67,14 @@ public sealed class ClientClothingSystem : ClothingSystem
private void OnAppearanceUpdate(EntityUid uid, InventoryComponent component, ref AppearanceChangeEvent args) private void OnAppearanceUpdate(EntityUid uid, InventoryComponent component, ref AppearanceChangeEvent args)
{ {
// May need to update jumpsuit stencils if the sex changed. Also required to properly set the stencil on init // May need to update displacement maps if the sex changed. Also required to properly set the stencil on init
if (args.Sprite == null) if (args.Sprite == null)
return; return;
if (_inventorySystem.TryGetSlotEntity(uid, Jumpsuit, out var suit, component) var enumerator = _inventorySystem.GetSlotEnumerator((uid, component));
&& TryComp(suit, out ClothingComponent? clothing)) while (enumerator.NextItem(out var item, out var slot))
{ {
SetGenderedMask(uid, args.Sprite, clothing); RenderEquipment(uid, item, slot.Name, component);
return;
} }
// No clothing equipped -> make sure the layer is hidden, though this should already be handled by on-unequip. // No clothing equipped -> make sure the layer is hidden, though this should already be handled by on-unequip.
@@ -179,14 +181,6 @@ public sealed class ClientClothingSystem : ClothingSystem
private void OnDidUnequip(EntityUid uid, SpriteComponent component, DidUnequipEvent args) private void OnDidUnequip(EntityUid uid, SpriteComponent component, DidUnequipEvent args)
{ {
// Hide jumpsuit mask layer.
if (args.Slot == Jumpsuit
&& TryComp(uid, out SpriteComponent? sprite)
&& sprite.LayerMapTryGet(HumanoidVisualLayers.StencilMask, out var maskLayer))
{
sprite.LayerSetVisible(maskLayer, false);
}
if (!TryComp(uid, out InventorySlotsComponent? inventorySlots)) if (!TryComp(uid, out InventorySlotsComponent? inventorySlots))
return; return;
@@ -231,9 +225,6 @@ public sealed class ClientClothingSystem : ClothingSystem
return; return;
} }
if (slot == Jumpsuit)
SetGenderedMask(equipee, sprite, clothingComponent);
if (!_inventorySystem.TryGetSlot(equipee, slot, out var slotDef, inventory)) if (!_inventorySystem.TryGetSlot(equipee, slot, out var slotDef, inventory))
return; return;
@@ -265,7 +256,25 @@ public sealed class ClientClothingSystem : ClothingSystem
// temporary, until layer draw depths get added. Basically: a layer with the key "slot" is being used as a // temporary, until layer draw depths get added. Basically: a layer with the key "slot" is being used as a
// bookmark to determine where in the list of layers we should insert the clothing layers. // bookmark to determine where in the list of layers we should insert the clothing layers.
bool slotLayerExists = sprite.LayerMapTryGet(slot, out var index); bool slotLayerExists = sprite.LayerMapTryGet(slot, out var index);
var displacementData = inventory.Displacements.GetValueOrDefault(slot);
// Select displacement maps
var displacementData = inventory.Displacements.GetValueOrDefault(slot); //Default unsexed map
var equipeeSex = CompOrNull<HumanoidAppearanceComponent>(equipee)?.Sex;
if (equipeeSex != null)
{
switch (equipeeSex)
{
case Sex.Male:
if (inventory.MaleDisplacements.Count > 0)
displacementData = inventory.MaleDisplacements.GetValueOrDefault(slot);
break;
case Sex.Female:
if (inventory.FemaleDisplacements.Count > 0)
displacementData = inventory.FemaleDisplacements.GetValueOrDefault(slot);
break;
}
}
// add the new layers // add the new layers
foreach (var (key, layerData) in ev.Layers) foreach (var (key, layerData) in ev.Layers)
@@ -292,7 +301,7 @@ public sealed class ClientClothingSystem : ClothingSystem
index = sprite.LayerMapReserveBlank(key); index = sprite.LayerMapReserveBlank(key);
if (sprite[index] is not Layer layer) if (sprite[index] is not Layer layer)
return; continue;
// In case no RSI is given, use the item's base RSI as a default. This cuts down on a lot of unnecessary yaml entries. // In case no RSI is given, use the item's base RSI as a default. This cuts down on a lot of unnecessary yaml entries.
if (layerData.RsiPath == null if (layerData.RsiPath == null
@@ -303,78 +312,19 @@ public sealed class ClientClothingSystem : ClothingSystem
layer.SetRsi(clothingSprite.BaseRSI); layer.SetRsi(clothingSprite.BaseRSI);
} }
// Another "temporary" fix for clothing stencil masks.
// Sprite layer redactor when
// Sprite "redactor" just a week away.
if (slot == Jumpsuit)
layerData.Shader ??= "StencilDraw";
sprite.LayerSetData(index, layerData); sprite.LayerSetData(index, layerData);
layer.Offset += slotDef.Offset; layer.Offset += slotDef.Offset;
if (displacementData != null) if (displacementData is not null)
{ {
if (displacementData.ShaderOverride != null) //Checking that the state is not tied to the current race. In this case we don't need to use the displacement maps.
sprite.LayerSetShader(index, displacementData.ShaderOverride); if (layerData.State is not null && inventory.SpeciesId is not null && layerData.State.EndsWith(inventory.SpeciesId))
var displacementKey = $"{key}-displacement";
if (!revealedLayers.Add(displacementKey))
{
Log.Warning($"Duplicate key for clothing visuals DISPLACEMENT: {displacementKey}.");
continue; continue;
}
var displacementLayer = _serialization.CreateCopy(displacementData.Layer, notNullableOverride: true); _displacement.TryAddDisplacement(displacementData, sprite, index, key, revealedLayers);
displacementLayer.CopyToShaderParameters!.LayerKey = key;
// Add before main layer for this item.
sprite.AddLayer(displacementLayer, index);
sprite.LayerMapSet(displacementKey, index);
revealedLayers.Add(displacementKey);
} }
} }
RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers), true); RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers), true);
} }
/// <summary>
/// Sets a sprite's gendered mask based on gender (obviously).
/// </summary>
/// <param name="sprite">Sprite to modify</param>
/// <param name="humanoid">Humanoid, to get gender from</param>
/// <param name="clothing">Clothing component, to get mask sprite type</param>
private void SetGenderedMask(EntityUid uid, SpriteComponent sprite, ClothingComponent clothing)
{
if (!sprite.LayerMapTryGet(HumanoidVisualLayers.StencilMask, out var layer))
return;
ClothingMask mask;
string prefix;
switch (CompOrNull<HumanoidAppearanceComponent>(uid)?.Sex)
{
case Sex.Male:
mask = clothing.MaleMask;
prefix = "male_";
break;
case Sex.Female:
mask = clothing.FemaleMask;
prefix = "female_";
break;
default:
mask = clothing.UnisexMask;
prefix = "unisex_";
break;
}
sprite.LayerSetState(layer, mask switch
{
ClothingMask.NoMask => $"{prefix}none",
ClothingMask.UniformTop => $"{prefix}top",
_ => $"{prefix}full",
});
sprite.LayerSetVisible(layer, true);
}
} }

View File

@@ -0,0 +1,65 @@
using Content.Shared.DisplacementMap;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Serialization.Manager;
namespace Content.Client.DisplacementMap;
public sealed class DisplacementMapSystem : EntitySystem
{
[Dependency] private readonly ISerializationManager _serialization = default!;
public bool TryAddDisplacement(DisplacementData data, SpriteComponent sprite, int index, string key, HashSet<string> revealedLayers)
{
if (data.ShaderOverride != null)
sprite.LayerSetShader(index, data.ShaderOverride);
var displacementKey = $"{key}-displacement";
if (!revealedLayers.Add(displacementKey))
{
Log.Warning($"Duplicate key for DISPLACEMENT: {displacementKey}.");
return false;
}
//allows you not to write it every time in the YML
foreach (var pair in data.SizeMaps)
{
pair.Value.CopyToShaderParameters??= new()
{
LayerKey = "dummy",
ParameterTexture = "displacementMap",
ParameterUV = "displacementUV",
};
}
if (!data.SizeMaps.ContainsKey(32))
{
Log.Error($"DISPLACEMENT: {displacementKey} don't have 32x32 default displacement map");
return false;
}
// We choose a displacement map from the possible ones, matching the size with the original layer size.
// If there is no such a map, we use a standard 32 by 32 one
var displacementDataLayer = data.SizeMaps[EyeManager.PixelsPerMeter];
var actualRSI = sprite.LayerGetActualRSI(index);
if (actualRSI is not null)
{
if (actualRSI.Size.X != actualRSI.Size.Y)
Log.Warning($"DISPLACEMENT: {displacementKey} has a resolution that is not 1:1, things can look crooked");
var layerSize = actualRSI.Size.X;
if (data.SizeMaps.ContainsKey(layerSize))
displacementDataLayer = data.SizeMaps[layerSize];
}
var displacementLayer = _serialization.CreateCopy(displacementDataLayer, notNullableOverride: true);
displacementLayer.CopyToShaderParameters!.LayerKey = key;
sprite.AddLayer(displacementLayer, index);
sprite.LayerMapSet(displacementKey, index);
revealedLayers.Add(displacementKey);
return true;
}
}

View File

@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using Content.Client.DisplacementMap;
using Content.Client.Examine; using Content.Client.Examine;
using Content.Client.Strip; using Content.Client.Strip;
using Content.Client.Verbs.UI; using Content.Client.Verbs.UI;
@@ -28,6 +29,7 @@ namespace Content.Client.Hands.Systems
[Dependency] private readonly SharedContainerSystem _containerSystem = default!; [Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly StrippableSystem _stripSys = default!; [Dependency] private readonly StrippableSystem _stripSys = default!;
[Dependency] private readonly ExamineSystem _examine = default!; [Dependency] private readonly ExamineSystem _examine = default!;
[Dependency] private readonly DisplacementMapSystem _displacement = default!;
public event Action<string, HandLocation>? OnPlayerAddHand; public event Action<string, HandLocation>? OnPlayerAddHand;
public event Action<string>? OnPlayerRemoveHand; public event Action<string>? OnPlayerRemoveHand;
@@ -345,6 +347,10 @@ namespace Content.Client.Hands.Systems
} }
sprite.LayerSetData(index, layerData); sprite.LayerSetData(index, layerData);
//Add displacement maps
if (handComp.HandDisplacement is not null)
_displacement.TryAddDisplacement(handComp.HandDisplacement, sprite, index, key, revealedLayers);
} }
RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers), true); RaiseLocalEvent(held, new HeldVisualsUpdatedEvent(uid, revealedLayers), true);

View File

@@ -59,18 +59,6 @@ public sealed partial class ClothingComponent : Component
[DataField("sprite")] [DataField("sprite")]
public string? RsiPath; public string? RsiPath;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("maleMask")]
public ClothingMask MaleMask = ClothingMask.UniformFull;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("femaleMask")]
public ClothingMask FemaleMask = ClothingMask.UniformFull;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("unisexMask")]
public ClothingMask UnisexMask = ClothingMask.UniformFull;
/// <summary> /// <summary>
/// Name of the inventory slot the clothing is in. /// Name of the inventory slot the clothing is in.
/// </summary> /// </summary>

View File

@@ -233,7 +233,6 @@ public abstract class ClothingSystem : EntitySystem
clothing.ClothingVisuals = otherClothing.ClothingVisuals; clothing.ClothingVisuals = otherClothing.ClothingVisuals;
clothing.EquippedPrefix = otherClothing.EquippedPrefix; clothing.EquippedPrefix = otherClothing.EquippedPrefix;
clothing.RsiPath = otherClothing.RsiPath; clothing.RsiPath = otherClothing.RsiPath;
clothing.FemaleMask = otherClothing.FemaleMask;
_itemSys.VisualsChanged(uid); _itemSys.VisualsChanged(uid);
Dirty(uid, clothing); Dirty(uid, clothing);

View File

@@ -0,0 +1,14 @@
namespace Content.Shared.DisplacementMap;
[DataDefinition]
public sealed partial class DisplacementData
{
/// <summary>
/// allows you to attach different maps for layers of different sizes.
/// </summary>
[DataField(required: true)]
public Dictionary<int, PrototypeLayerData> SizeMaps = new();
[DataField]
public string? ShaderOverride = "DisplacedStencilDraw";
}

View File

@@ -1,3 +1,4 @@
using Content.Shared.DisplacementMap;
using Content.Shared.Hands.EntitySystems; using Content.Shared.Hands.EntitySystems;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
@@ -76,6 +77,9 @@ public sealed partial class HandsComponent : Component
/// </summary> /// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)] [DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan ThrowCooldown = TimeSpan.FromSeconds(0.5f); public TimeSpan ThrowCooldown = TimeSpan.FromSeconds(0.5f);
[DataField]
public DisplacementData? HandDisplacement;
} }
[Serializable, NetSerializable] [Serializable, NetSerializable]

View File

@@ -1,4 +1,5 @@
using Robust.Shared.Containers; using Content.Shared.DisplacementMap;
using Robust.Shared.Containers;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -13,18 +14,21 @@ public sealed partial class InventoryComponent : Component
[DataField("speciesId")] public string? SpeciesId { get; set; } [DataField("speciesId")] public string? SpeciesId { get; set; }
[DataField] public Dictionary<string, SlotDisplacementData> Displacements = [];
public SlotDefinition[] Slots = Array.Empty<SlotDefinition>(); public SlotDefinition[] Slots = Array.Empty<SlotDefinition>();
public ContainerSlot[] Containers = Array.Empty<ContainerSlot>(); public ContainerSlot[] Containers = Array.Empty<ContainerSlot>();
[DataDefinition]
public sealed partial class SlotDisplacementData
{
[DataField(required: true)]
public PrototypeLayerData Layer = default!;
[DataField] [DataField]
public string? ShaderOverride = "DisplacedStencilDraw"; public Dictionary<string, DisplacementData> Displacements = new();
}
/// <summary>
/// Alternate displacement maps, which if available, will be selected for the player of the appropriate gender.
/// </summary>
[DataField]
public Dictionary<string, DisplacementData> FemaleDisplacements = new();
/// <summary>
/// Alternate displacement maps, which if available, will be selected for the player of the appropriate gender.
/// </summary>
[DataField]
public Dictionary<string, DisplacementData> MaleDisplacements = new();
} }

View File

@@ -210,7 +210,6 @@
sprite: Clothing/Uniforms/Jumpsuit/clown.rsi sprite: Clothing/Uniforms/Jumpsuit/clown.rsi
- type: Clothing - type: Clothing
sprite: Clothing/Uniforms/Jumpsuit/clown.rsi sprite: Clothing/Uniforms/Jumpsuit/clown.rsi
femaleMask: UniformTop
- type: Tag - type: Tag
tags: tags:
- ClownSuit - ClownSuit
@@ -224,7 +223,6 @@
sprite: Clothing/Uniforms/Jumpsuit/clown_banana.rsi sprite: Clothing/Uniforms/Jumpsuit/clown_banana.rsi
- type: Clothing - type: Clothing
sprite: Clothing/Uniforms/Jumpsuit/clown_banana.rsi sprite: Clothing/Uniforms/Jumpsuit/clown_banana.rsi
femaleMask: UniformTop
- type: Construction - type: Construction
graph: BananaClownJumpsuit graph: BananaClownJumpsuit
node: jumpsuit node: jumpsuit

View File

@@ -19,8 +19,6 @@
- state: mask_null - state: mask_null
map: [ "overlay" ] map: [ "overlay" ]
- type: Clothing - type: Clothing
femaleMask: UniformTop
maleMask: UniformTop
sprite: Clothing/Uniforms/procedural.rsi sprite: Clothing/Uniforms/procedural.rsi
clothingVisuals: clothingVisuals:
jumpsuit: jumpsuit:

View File

@@ -28,8 +28,6 @@
spawned: spawned:
- id: FoodMeatSpider - id: FoodMeatSpider
amount: 5 amount: 5
- type: Inventory
templateId: arachnid
- type: Reactive - type: Reactive
reactions: reactions:
- reagents: [Water] - reagents: [Water]
@@ -80,16 +78,6 @@
- map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: Mobs/Species/Human/parts.rsi #PJB on stencil clear being on the left leg: "...this is 'fine'" -https://github.com/space-wizards/space-station-14/pull/12217#issuecomment-1291677115
# its fine, but its still very stupid that it has to be done like this instead of allowing sprites to just directly insert a stencil clear.
# sprite refactor when
state: l_leg
- shader: StencilMask
map: ["enum.HumanoidVisualLayers.StencilMask"]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: ["jumpsuit"] - map: ["jumpsuit"]
- map: ["enum.HumanoidVisualLayers.LFoot"] - map: ["enum.HumanoidVisualLayers.LFoot"]
- map: ["enum.HumanoidVisualLayers.RFoot"] - map: ["enum.HumanoidVisualLayers.RFoot"]
@@ -122,6 +110,9 @@
sprite: "Effects/creampie.rsi" sprite: "Effects/creampie.rsi"
state: "creampie_arachnid" state: "creampie_arachnid"
visible: false visible: false
- type: Inventory
templateId: arachnid
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -131,4 +122,5 @@
- type: HumanoidAppearance - type: HumanoidAppearance
species: Arachnid species: Arachnid
#88w88
#>88w88<

View File

@@ -18,16 +18,6 @@
- map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: Mobs/Species/Human/parts.rsi #PJB on stencil clear being on the left leg: "...this is 'fine'" -https://github.com/space-wizards/space-station-14/pull/12217#issuecomment-1291677115
# its fine, but its still very stupid that it has to be done like this instead of allowing sprites to just directly insert a stencil clear.
# sprite refactor when
state: l_leg
- shader: StencilMask
map: ["enum.HumanoidVisualLayers.StencilMask"]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: ["jumpsuit"] - map: ["jumpsuit"]
- map: ["enum.HumanoidVisualLayers.LFoot"] - map: ["enum.HumanoidVisualLayers.LFoot"]
- map: ["enum.HumanoidVisualLayers.RFoot"] - map: ["enum.HumanoidVisualLayers.RFoot"]
@@ -307,14 +297,6 @@
- map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: Mobs/Species/Human/parts.rsi
state: l_leg
- shader: StencilMask
map: ["enum.HumanoidVisualLayers.StencilMask"]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: ["jumpsuit"] - map: ["jumpsuit"]
- map: ["enum.HumanoidVisualLayers.LFoot"] - map: ["enum.HumanoidVisualLayers.LFoot"]
- map: ["enum.HumanoidVisualLayers.RFoot"] - map: ["enum.HumanoidVisualLayers.RFoot"]

View File

@@ -82,8 +82,6 @@
- MobMask - MobMask
layer: layer:
- MobLayer - MobLayer
- type: Inventory
templateId: diona
- type: Speech - type: Speech
speechVerb: Plant speechVerb: Plant
- type: Vocal - type: Vocal
@@ -101,13 +99,27 @@
actionPrototype: DionaGibAction actionPrototype: DionaGibAction
allowedStates: allowedStates:
- Dead - Dead
- type: Inventory
templateId: diona
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
id: MobDionaDummy id: MobDionaDummy
noSpawn: true noSpawn: true
components: components:
- type: Inventory
templateId: diona
- type: HumanoidAppearance - type: HumanoidAppearance
species: Diona species: Diona
- type: Inventory
templateId: diona
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -56,6 +56,13 @@
hideLayersOnEquip: hideLayersOnEquip:
- Hair - Hair
- Snout - Snout
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -64,3 +71,10 @@
components: components:
- type: Sprite - type: Sprite
scale: 1, 0.8 scale: 1, 0.8
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -40,6 +40,14 @@
- MobMask - MobMask
layer: layer:
- MobLayer - MobLayer
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -48,3 +56,10 @@
components: components:
- type: HumanoidAppearance - type: HumanoidAppearance
species: Gingerbread species: Gingerbread
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -20,8 +20,25 @@
hideLayersOnEquip: hideLayersOnEquip:
- Hair - Hair
- Snout - Snout
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
id: MobHumanDummy id: MobHumanDummy
noSpawn: true noSpawn: true
components:
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -76,16 +76,6 @@
- map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: Mobs/Species/Human/parts.rsi #PJB on stencil clear being on the left leg: "...this is 'fine'" -https://github.com/space-wizards/space-station-14/pull/12217#issuecomment-1291677115
# its fine, but its still very stupid that it has to be done like this instead of allowing sprites to just directly insert a stencil clear.
# sprite refactor when
state: l_leg
- shader: StencilMask
map: [ "enum.HumanoidVisualLayers.StencilMask" ]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: [ "jumpsuit" ] - map: [ "jumpsuit" ]
- map: [ "enum.HumanoidVisualLayers.LHand" ] - map: [ "enum.HumanoidVisualLayers.LHand" ]
- map: [ "enum.HumanoidVisualLayers.RHand" ] - map: [ "enum.HumanoidVisualLayers.RHand" ]
@@ -118,6 +108,14 @@
sprite: "Effects/creampie.rsi" sprite: "Effects/creampie.rsi"
state: "creampie_moth" state: "creampie_moth"
visible: false visible: false
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -126,3 +124,11 @@
components: components:
- type: HumanoidAppearance - type: HumanoidAppearance
species: Moth species: Moth
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -26,8 +26,6 @@
spawned: spawned:
- id: FoodMeatLizard - id: FoodMeatLizard
amount: 5 amount: 5
- type: Inventory
speciesId: reptilian
- type: LizardAccent - type: LizardAccent
- type: Speech - type: Speech
speechSounds: Lizard speechSounds: Lizard
@@ -62,6 +60,15 @@
types: types:
Heat : 1.5 #per second, scales with temperature & other constants Heat : 1.5 #per second, scales with temperature & other constants
- type: Wagging - type: Wagging
- type: Inventory
speciesId: reptilian
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -77,5 +84,11 @@
- HeadSide - HeadSide
- type: Inventory - type: Inventory
speciesId: reptilian speciesId: reptilian
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
#Weh #Weh

View File

@@ -102,6 +102,13 @@
- type: FireVisuals - type: FireVisuals
alternateState: Standing alternateState: Standing
- type: FlashImmunity - type: FlashImmunity
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -110,3 +117,10 @@
components: components:
- type: HumanoidAppearance - type: HumanoidAppearance
species: Skeleton species: Skeleton
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -109,6 +109,13 @@
types: types:
Asphyxiation: -1.0 Asphyxiation: -1.0
maxSaturation: 15 maxSaturation: 15
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: entity - type: entity
parent: MobHumanDummy parent: MobHumanDummy
@@ -117,3 +124,10 @@
components: components:
- type: HumanoidAppearance - type: HumanoidAppearance
species: SlimePerson species: SlimePerson
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female

View File

@@ -14,42 +14,6 @@
- type: HumanoidAppearance - type: HumanoidAppearance
species: Vox species: Vox
#- type: VoxAccent # Not yet coded #- type: VoxAccent # Not yet coded
- type: Inventory
speciesId: vox
displacements:
jumpsuit:
layer:
sprite: Mobs/Species/Vox/displacement.rsi
state: jumpsuit
copyToShaderParameters:
# Value required, provide a dummy. Gets overridden when applied.
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
eyes:
layer:
sprite: Mobs/Species/Vox/displacement.rsi
state: eyes
copyToShaderParameters:
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
gloves:
layer:
sprite: Mobs/Species/Vox/displacement.rsi
state: hand
copyToShaderParameters:
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
back:
layer:
sprite: Mobs/Species/Vox/displacement.rsi
state: back
copyToShaderParameters:
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
- type: Speech - type: Speech
speechVerb: Vox speechVerb: Vox
speechSounds: Vox speechSounds: Vox
@@ -126,6 +90,39 @@
sprite: "Effects/creampie.rsi" sprite: "Effects/creampie.rsi"
state: "creampie_vox" # Not default state: "creampie_vox" # Not default
visible: false visible: false
- type: Inventory
speciesId: vox
displacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: jumpsuit
eyes:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: eyes
gloves:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: hand
back:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: back
ears:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: ears
shoes:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: shoes
- type: entity - type: entity
parent: BaseSpeciesDummy parent: BaseSpeciesDummy
@@ -140,36 +137,32 @@
speciesId: vox speciesId: vox
displacements: displacements:
jumpsuit: jumpsuit:
layer: sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi sprite: Mobs/Species/Vox/displacement.rsi
state: jumpsuit state: jumpsuit
copyToShaderParameters:
# Value required, provide a dummy. Gets overridden when applied.
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
eyes: eyes:
layer: sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi sprite: Mobs/Species/Vox/displacement.rsi
state: eyes state: eyes
copyToShaderParameters:
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
gloves: gloves:
layer: sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi sprite: Mobs/Species/Vox/displacement.rsi
state: hand state: hand
copyToShaderParameters:
layerKey: dummy
parameterTexture: displacementMap
parameterUV: displacementUV
back: back:
layer: sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi sprite: Mobs/Species/Vox/displacement.rsi
state: back state: back
copyToShaderParameters: ears:
layerKey: dummy sizeMaps:
parameterTexture: displacementMap 32:
parameterUV: displacementUV sprite: Mobs/Species/Vox/displacement.rsi
state: ears
shoes:
sizeMaps:
32:
sprite: Mobs/Species/Vox/displacement.rsi
state: shoes

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

View File

@@ -0,0 +1,18 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Made by TheShuEd",
"size": {
"x": 32,
"y": 32
},
"load": {
"srgb": false
},
"states": [
{
"name": "jumpsuit-female",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

View File

@@ -1,7 +1,7 @@
{ {
"version": 1, "version": 1,
"license": "CC-BY-SA-3.0", "license": "CC-BY-SA-3.0",
"copyright": "jumpsuit state made by PJB3005. back, hand, and eyes states made by Flareguy", "copyright": "jumpsuit state made by PJB3005. back, hand, and eyes states made by Flareguy, ears and shoes made by TheShuEd",
"size": { "size": {
"x": 32, "x": 32,
"y": 32 "y": 32
@@ -22,9 +22,17 @@
"name": "hand", "name": "hand",
"directions": 4 "directions": 4
}, },
{
"name": "ears",
"directions": 4
},
{ {
"name": "eyes", "name": "eyes",
"directions": 4 "directions": 4
},
{
"name": "shoes",
"directions": 4
} }
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B