using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Power.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ChargerComponent : Component
{
///
/// The charge rate of the charger, in watts.
///
[DataField, AutoNetworkedField]
public float ChargeRate = 20.0f;
///
/// Passive draw when no power cell is inserted, in watts.
/// This should be larger than 0 or the charger will be considered as powered even without a LV supply.
///
[DataField, AutoNetworkedField]
public float PassiveDraw = 1f;
///
/// The container ID that is holds the entities being charged.
///
[DataField(required: true)]
public string SlotId = string.Empty;
///
/// A whitelist for what entities can be charged by this Charger.
///
[DataField, AutoNetworkedField]
public EntityWhitelist? Whitelist;
///
/// Indicates whether the charger is portable and thus subject to EMP effects
/// and bypasses checks for transform, anchored, and ApcPowerReceiverComponent.
///
[DataField, AutoNetworkedField]
public bool Portable = false;
}
[Serializable, NetSerializable]
public enum CellChargerStatus
{
Off,
Empty,
Charging,
Charged,
}
[Serializable, NetSerializable]
public enum CellVisual
{
Occupied, // If there's an item in it
Light,
}