2022-08-08 10:18:14 +10:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Sprite;
|
|
|
|
|
|
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class RandomSpriteComponent : Component
|
2022-08-08 10:18:14 +10:00
|
|
|
{
|
2023-05-06 23:14:54 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether or not all groups from <see cref="Available"/> are used,
|
|
|
|
|
/// or if only one is picked at random.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("getAllGroups")]
|
|
|
|
|
public bool GetAllGroups;
|
|
|
|
|
|
2022-08-08 10:18:14 +10:00
|
|
|
/// <summary>
|
|
|
|
|
/// Available colors based on group, parsed layer enum, state, and color.
|
|
|
|
|
/// Stored as a list so we can have groups of random sprites (e.g. tech_base + tech_flare for holoparasite)
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("available")]
|
2024-01-03 19:39:00 -05:00
|
|
|
public List<Dictionary<string, Dictionary<string, string?>>> Available = new();
|
2022-08-08 10:18:14 +10:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Selected colors
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("selected")]
|
|
|
|
|
public Dictionary<string, (string State, Color? Color)> Selected = new();
|
2024-05-03 20:40:31 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// CP14 Base Random Sprite color
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public Color CP14InheritBaseColor = Color.White;
|
2022-08-08 10:18:14 +10:00
|
|
|
}
|