#nullable enable
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Shared.GameObjects.Components
{
public class SharedCrayonComponent : Component
public override string Name => "Crayon";
public override uint? NetID => ContentNetIDs.CRAYONS;
public string SelectedState { get; set; } = string.Empty;
[DataField("color")]
protected string _color = "white";
[Serializable, NetSerializable]
public enum CrayonUiKey
Key,
}
public class CrayonSelectMessage : BoundUserInterfaceMessage
public readonly string State;
public CrayonSelectMessage(string selected)
State = selected;
public enum CrayonVisuals
State,
Color,
Rotation
public class CrayonComponentState : ComponentState
public readonly string Color;
public readonly int Charges;
public readonly int Capacity;
public CrayonComponentState(string color, string state, int charges, int capacity) : base(ContentNetIDs.CRAYONS)
Color = color;
State = state;
Charges = charges;
Capacity = capacity;
public class CrayonBoundUserInterfaceState : BoundUserInterfaceState
public string Selected;
public Color Color;
public CrayonBoundUserInterfaceState(string selected, Color color)
Selected = selected;
[Serializable, NetSerializable, Prototype("crayonDecal")]
public class CrayonDecalPrototype : IPrototype
[ViewVariables]
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[field: DataField("parent")]
public string? Parent { get; }
[field: DataField("spritePath")] public string SpritePath { get; } = string.Empty;
[field: DataField("decals")] public List<string> Decals { get; } = new();