Files
crystall-punk-14/Content.Shared/_CP14/Skill/Components/CP14SkillStorageComponent.cs
Red 422a0c5e10 Gods and religions (#1405)
* basic religion vision

* block god interactions

* skill tree mob specify

* silvania setup??

* clustering shader optimization

* gods department & job

* random gods jobs

* Luxian god

* Update Nature.png

* Update sphere_of_light.yml

* god chat

* Update ChatSystem.cs

* OBSERVATION

* public observation and basic follower api

* shader tweaks

* improve shaders

* spawning and praying on altars

* altars ppvs override

* move pvs overridiation from altars to observers

* shader coloration

* spectral z mover

* god magic radius restricted

* guide how to believe in god

* sends messages to god when smoeone wanna become follower

* follower doAfter

* goodbye luxian, welcome lumera

* goodbye silvania, welcome merkas

* som polish and renamings

* gods fast travel

* Update altar.ftl

* some lumera sfx

* renouncing patrons!

* renounce followers

* followewr percentage calculation

* remove from player-facing

* fix

* Update sphere_of_light.yml

* Update base.yml
2025-06-13 14:15:48 +03:00

61 lines
2.4 KiB
C#

using Content.Shared._CP14.ResearchTable;
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;
/// <summary>
/// Component that stores the skills learned by a player and their progress in the skill trees.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
[Access(typeof(CP14SharedSkillSystem), typeof(CP14SharedResearchSystem))]
public sealed partial class CP14SkillStorageComponent : Component
{
/// <summary>
/// Skill trees displayed in the skill tree interface. Only skills from these trees can be learned by this player.
/// </summary>
[DataField]
public HashSet<ProtoId<CP14SkillTreePrototype>> AvailableSkillTrees = new();
/// <summary>
/// Tracks skills that are learned without spending memory points.
/// the skills that are here are DOUBLED in the LearnedSkills,
/// </summary>
[DataField, AutoNetworkedField]
public List<ProtoId<CP14SkillPrototype>> FreeLearnedSkills = new();
[DataField, AutoNetworkedField]
public List<ProtoId<CP14SkillPrototype>> LearnedSkills = new();
/// <summary>
/// skills that the player has learned on the research table, but has not yet learned in the skill tree.
/// </summary>
[DataField, AutoNetworkedField]
public List<ProtoId<CP14SkillPrototype>> ResearchedSkills = new();
/// <summary>
/// The number of experience points spent on skills. Technically this could be calculated via LearnedSkills, but this is a cached value for optimization.
/// </summary>
[DataField, AutoNetworkedField]
public FixedPoint2 SkillsSumExperience = 0;
/// <summary>
/// The maximum ceiling of experience points that can be spent on learning skills. Not tied to a category.
/// </summary>
[DataField, AutoNetworkedField]
public FixedPoint2 ExperienceMaxCap = 5;
}
/// <summary>
/// Raised when a player attempts to learn a skill. This is sent from the client to the server.
/// </summary>
[Serializable, NetSerializable]
public sealed class CP14TryLearnSkillMessage(NetEntity entity, ProtoId<CP14SkillPrototype> skill) : EntityEventArgs
{
public readonly NetEntity Entity = entity;
public readonly ProtoId<CP14SkillPrototype> Skill = skill;
}