using Content.Shared.Destructible.Thresholds;
using Robust.Shared.GameStates;
namespace Content.Shared.Xenoarchaeology.Artifact.Components;
///
/// Stores metadata about a particular artifact node
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedXenoArtifactSystem)), AutoGenerateComponentState]
public sealed partial class XenoArtifactNodeComponent : Component
{
///
/// Depth within the graph generation.
/// Used for sorting.
///
[DataField, AutoNetworkedField]
public int Depth;
///
/// Denotes whether an artifact node has been activated at least once (through the required triggers).
///
[DataField, AutoNetworkedField]
public bool Locked = true;
///
/// List of trigger descriptions that this node require for activation.
///
[DataField, AutoNetworkedField]
public LocId? TriggerTip;
///
/// The entity whose graph this node is a part of.
///
[DataField, AutoNetworkedField]
public EntityUid? Attached;
#region Durability
///
/// Marker, is durability of node degraded or not.
///
public bool Degraded => Durability <= 0;
///
/// The amount of generic activations a node has left before becoming fully degraded and useless.
///
[DataField, AutoNetworkedField]
public int Durability;
///
/// The maximum amount of times a node can be generically activated before becoming useless
///
[DataField, AutoNetworkedField]
public int MaxDurability = 5;
///
/// The variance from MaxDurability present when a node is created.
///
[DataField]
public MinMax MaxDurabilityCanDecreaseBy = new(0, 2);
#endregion
#region Research
///
/// The amount of points a node is worth with no scaling
///
[DataField, AutoNetworkedField]
public float BasePointValue = 4000;
///
/// Amount of points available currently for extracting.
///
[DataField, AutoNetworkedField]
public int ResearchValue;
///
/// Amount of points already extracted from node.
///
[DataField, AutoNetworkedField]
public int ConsumedResearchValue;
#endregion
}