using Content.Shared._CP14.Skill.Prototypes; using Content.Shared.FixedPoint; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared._CP14.Skill.Components; /// /// Component that stores the skills learned by a player and their progress in the skill trees. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] [Access(typeof(CP14SharedSkillSystem))] public sealed partial class CP14SkillStorageComponent : Component { [DataField, AutoNetworkedField] public List> LearnedSkills = new(); /// /// The number of experience points spent on skills. Technically this could be calculated via LearnedSkills, but this is a cached value for optimization. /// [DataField, AutoNetworkedField] public FixedPoint2 SkillsSumExperience = 0; /// /// Keeps track of progress points in the knowledge areas available to the player. Important: The absence of a specific area means that the player CANNOT progress in that area. /// [DataField, AutoNetworkedField] public Dictionary, FixedPoint2> Progress = new(); /// /// The maximum ceiling of experience points that can be spent on learning skills. Not tied to a category. /// [DataField, AutoNetworkedField] public FixedPoint2 ExperienceMaxCap = 10; } /// /// Raised when a player attempts to learn a skill. This is sent from the client to the server. /// [Serializable, NetSerializable] public sealed class CP14TryLearnSkillMessage(NetEntity entity, ProtoId skill) : EntityEventArgs { public readonly NetEntity Entity = entity; public readonly ProtoId Skill = skill; }