using Content.Server.Anomaly.Effects;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Anomaly.Components;
///
/// This component exists for a limited time, and after it expires it modifies the entity, greatly reducing its value and changing its visuals
///
[RegisterComponent, Access(typeof(AnomalyCoreSystem))]
public sealed partial class AnomalyCoreComponent : Component
{
///
/// Amount of time required for the core to decompose into an inert core
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public double TimeToDecay = 600;
///
/// The moment of core decay. It is set during entity initialization.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan DecayMoment;
///
/// The starting value of the entity.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public double StartPrice = 10000;
///
/// The value of the object sought during decaying
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public double EndPrice = 200;
///
/// Has the core decayed?
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool IsDecayed;
}