using Content.Shared.Lathe;
using Content.Shared.Research.Prototypes;
using Content.Shared.Research.Systems;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Shared.Research.Components;
[RegisterComponent, NetworkedComponent, Access(typeof(SharedResearchSystem), typeof(SharedLatheSystem)), AutoGenerateComponentState]
public sealed partial class TechnologyDatabaseComponent : Component
{
///
/// A main discipline that locks out other discipline technology past a certain tier.
///
[AutoNetworkedField]
[DataField("mainDiscipline", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string? MainDiscipline;
[AutoNetworkedField]
[DataField("currentTechnologyCards")]
public List CurrentTechnologyCards = new();
///
/// Which research disciplines are able to be unlocked
///
[AutoNetworkedField]
[DataField("supportedDisciplines", customTypeSerializer: typeof(PrototypeIdListSerializer))]
public List SupportedDisciplines = new();
///
/// The ids of all the technologies which have been unlocked.
///
[AutoNetworkedField]
[DataField("unlockedTechnologies", customTypeSerializer: typeof(PrototypeIdListSerializer))]
public List UnlockedTechnologies = new();
///
/// The ids of all the lathe recipes which have been unlocked.
/// This is maintained alongside the TechnologyIds
///
/// todo: if you unlock all the recipes in a tech, it doesn't count as unlocking the tech. sadge
[AutoNetworkedField]
[DataField("unlockedRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer))]
public List UnlockedRecipes = 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;