Add support for multi-layer in-hand and clothing sprites (#6252)

This commit is contained in:
Leon Friedrich
2022-02-07 16:37:57 +13:00
committed by GitHub
parent aad52dfd35
commit 470e4f8bdc
17 changed files with 529 additions and 262 deletions

View File

@@ -3,8 +3,6 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Robust.Shared.Containers;
@@ -18,6 +16,7 @@ using Robust.Shared.Physics;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
using static Robust.Shared.GameObjects.SharedSpriteComponent;
namespace Content.Shared.Hands.Components
{
@@ -708,47 +707,6 @@ namespace Content.Shared.Hands.Components
}
}
#region visualizerData
[Serializable, NetSerializable]
public enum HandsVisuals : byte
{
VisualState
}
[Serializable, NetSerializable]
public class HandsVisualState : ICloneable
{
public List<HandVisualState> Hands { get; } = new();
public HandsVisualState(List<HandVisualState> hands)
{
Hands = hands;
}
public object Clone()
{
return new HandsVisualState(new List<HandVisualState>(Hands));
}
}
[Serializable, NetSerializable]
public struct HandVisualState
{
public string RsiPath { get; }
public string? EquippedPrefix { get; }
public HandLocation Location { get; }
public Color Color { get; }
public HandVisualState(string rsiPath, string? equippedPrefix, HandLocation location, Color color)
{
RsiPath = rsiPath;
EquippedPrefix = equippedPrefix;
Location = location;
Color = color;
}
}
#endregion
[Serializable, NetSerializable]
public class Hand
{