Files
crystall-punk-14/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyCrystalSlotComponent.cs
Ed 0211a50581 Energy crystal (#243)
* 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
2024-06-13 22:55:20 +03:00

48 lines
1.2 KiB
C#

using Robust.Shared.Serialization;
namespace Content.Shared._CP14.MagicEnergy.Components;
/// <summary>
/// Allows you to examine how much energy is in that object
/// </summary>
[RegisterComponent, Access(typeof(SharedCP14MagicEnergyCrystalSlotSystem))]
public sealed partial class CP14MagicEnergyCrystalSlotComponent : Component
{
[DataField(required: true)]
public string SlotId = string.Empty;
public bool Powered = false;
}
[Serializable, NetSerializable]
public enum CP14MagicSlotVisuals : byte
{
Inserted,
Powered
}
/// <summary>
/// Is called when the state of the crystal is changed: it is pulled out, inserted, or the amount of energy in it has changed.
/// </summary>
public sealed class CP14SlotCrystalChangedEvent : EntityEventArgs
{
public readonly bool Ejected;
public CP14SlotCrystalChangedEvent(bool ejected)
{
Ejected = ejected;
}
}
/// <summary>
/// Is called when the power status of the device changes.
/// </summary>
public sealed class CP14SlotCrystalPowerChangedEvent : EntityEventArgs
{
public readonly bool Powered;
public CP14SlotCrystalPowerChangedEvent(bool powered)
{
Powered = powered;
}
}