Add multi-layer in-hand and clothing support (#6740)

This commit is contained in:
Leon Friedrich
2022-03-02 12:29:42 +13:00
committed by GitHub
parent d088f0f02c
commit c4c238bda9
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
{
@@ -709,47 +708,6 @@ namespace Content.Shared.Hands.Components
}
}
#region visualizerData
[Serializable, NetSerializable]
public enum HandsVisuals : byte
{
VisualState
}
[Serializable, NetSerializable]
public sealed 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 sealed class Hand
{