using Content.Shared._CP14.Skill.Prototypes; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared._CP14.Skill; [Serializable, NetSerializable] public enum CP14ResearchTableUiKey { Key, } [Serializable, NetSerializable] public sealed class CP14ResearchMessage(ProtoId skill) : BoundUserInterfaceMessage { public readonly ProtoId Skill = skill; } [Serializable, NetSerializable] public sealed class CP14ResearchTableUiState(List skills) : BoundUserInterfaceState { public readonly List Skills = skills; } [Serializable, NetSerializable] public readonly struct CP14ResearchUiEntry(ProtoId protoId, bool craftable) : IEquatable { public readonly ProtoId ProtoId = protoId; public readonly bool Craftable = craftable; public int CompareTo(CP14ResearchUiEntry other) { return Craftable.CompareTo(other.Craftable); } public override bool Equals(object? obj) { return obj is CP14ResearchUiEntry other && Equals(other); } public bool Equals(CP14ResearchUiEntry other) { return ProtoId.Id == other.ProtoId.Id; } public override int GetHashCode() { return HashCode.Combine(ProtoId, Craftable); } public override string ToString() { return $"{ProtoId} ({Craftable})"; } public static int CompareTo(CP14ResearchUiEntry left, CP14ResearchUiEntry right) { return right.CompareTo(left); } }