* init magic container system * charging and discharging * add energy regenerator * thaumaturgy glasses, scanning energy * add energy quartz prorotypes and sprites * light power controller * commit special for _des * simple normalizer crystal slot * YEEEEEEE BOIII, examined crystalls inside things * кристал теперь видно, когда он вставлен в стабилизатор * TryUseCharge приборами * hello deserty, how are you doing? * rename regenerator to EnergyDraw, allow draw from slot * normalizer жрет magic energy файналли * Update normalizer.yml * visual polishing * Update crystal.yml
35 lines
939 B
C#
35 lines
939 B
C#
using Content.Shared.FixedPoint;
|
|
|
|
namespace Content.Server._CP14.MagicEnergy.Components;
|
|
|
|
/// <summary>
|
|
/// Allows you to restore or deplete the magical energy in the item
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(CP14MagicEnergySystem))]
|
|
public sealed partial class CP14MagicEnergyDrawComponent : Component
|
|
{
|
|
[DataField]
|
|
public bool Enable = true;
|
|
|
|
[DataField]
|
|
public FixedPoint2 Energy = 1f;
|
|
|
|
/// <summary>
|
|
/// If not safe, restoring or drawing power across boundaries call dangerous events, that may destroy crystals
|
|
/// </summary>
|
|
[DataField]
|
|
public bool Safe = true;
|
|
|
|
/// <summary>
|
|
/// how often objects will try to change magic energy. In Seconds
|
|
/// </summary>
|
|
[DataField]
|
|
public float Delay = 5f;
|
|
|
|
/// <summary>
|
|
/// the time of the next magic energy change
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan NextUpdateTime { get; set; } = TimeSpan.Zero;
|
|
}
|