Revert "Add support for multi-layer in-hand and clothing sprites" (#6521)
This commit is contained in:
@@ -1,67 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Hands.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
using static Robust.Shared.GameObjects.SharedSpriteComponent;
|
||||
|
||||
namespace Content.Shared.Hands
|
||||
{
|
||||
/// <summary>
|
||||
/// Raised directed at an item that needs to update its in-hand sprites/layers.
|
||||
/// </summary>
|
||||
public class GetInhandVisualsEvent : EntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Entity that owns the hand holding the item.
|
||||
/// </summary>
|
||||
public readonly EntityUid User;
|
||||
|
||||
public readonly HandLocation Location;
|
||||
|
||||
/// <summary>
|
||||
/// The layers that will be added to the entity that is holding this item.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Note that the actual ordering of the layers depends on the order in which they are added to this list;
|
||||
/// </remarks>
|
||||
public List<(string, PrototypeLayerData)> Layers = new();
|
||||
|
||||
public GetInhandVisualsEvent(EntityUid user, HandLocation location)
|
||||
{
|
||||
User = user;
|
||||
Location = location;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised directed at an item after its visuals have been updated.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Useful for systems/components that modify the visual layers that an item adds to a player. (e.g. RGB memes)
|
||||
/// </remarks>
|
||||
public class HeldVisualsUpdatedEvent : EntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Entity that is holding the item.
|
||||
/// </summary>
|
||||
public readonly EntityUid User;
|
||||
|
||||
/// <summary>
|
||||
/// The layers that this item is now revealing.
|
||||
/// </summary>
|
||||
public HashSet<string> RevealedLayers;
|
||||
|
||||
public HeldVisualsUpdatedEvent(EntityUid user, HashSet<string> revealedLayers)
|
||||
{
|
||||
User = user;
|
||||
RevealedLayers = revealedLayers;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when an entity item in a hand is deselected.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user