using Content.Shared.Research.Prototypes; using Robust.Shared.GameStates; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Research.Components { [RegisterComponent, NetworkedComponent] public sealed class TechnologyDatabaseComponent : Component { /// /// The ids of all the technologies which have been unlocked. /// [DataField("technologyIds", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List TechnologyIds = new(); /// /// The ids of all the lathe recipes which have been unlocked. /// This is maintained alongside the TechnologyIds /// [DataField("recipeIds", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List RecipeIds = new(); } /// /// Event raised on the database whenever its /// technologies or recipes are modified. /// /// /// This event is forwarded from the /// server to all of it's clients. /// [ByRefEvent] public readonly record struct TechnologyDatabaseModifiedEvent; [Serializable, NetSerializable] public sealed class TechnologyDatabaseState : ComponentState { public List Technologies; public List Recipes; public TechnologyDatabaseState(List technologies, List recipes) { Technologies = technologies; Recipes = recipes; } } }