2022-01-05 17:20:25 +13:00
|
|
|
using Content.Shared.Power;
|
2023-08-15 18:49:30 -04:00
|
|
|
using Content.Shared.Whitelist;
|
2022-01-05 17:20:25 +13:00
|
|
|
|
|
|
|
|
namespace Content.Server.Power.Components
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ChargerComponent : Component
|
2022-01-05 17:20:25 +13:00
|
|
|
{
|
|
|
|
|
[ViewVariables]
|
2022-10-16 03:21:54 -07:00
|
|
|
public CellChargerStatus Status;
|
2022-01-05 17:20:25 +13:00
|
|
|
|
2023-05-31 15:48:55 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The charge rate of the charger, in watts
|
|
|
|
|
/// </summary>
|
2022-01-05 17:20:25 +13:00
|
|
|
[DataField("chargeRate")]
|
2023-05-31 15:48:55 +02:00
|
|
|
public float ChargeRate = 20.0f;
|
|
|
|
|
|
2023-08-15 18:49:30 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// The container ID that is holds the entities being charged.
|
|
|
|
|
/// </summary>
|
2022-10-16 03:21:54 -07:00
|
|
|
[DataField("slotId", required: true)]
|
|
|
|
|
public string SlotId = string.Empty;
|
2023-08-15 18:49:30 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A whitelist for what entities can be charged by this Charger.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("whitelist")]
|
|
|
|
|
public EntityWhitelist? Whitelist;
|
2024-04-28 06:19:33 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates whether the charger is portable and thus subject to EMP effects
|
|
|
|
|
/// and bypasses checks for transform, anchored, and ApcPowerReceiverComponent.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public bool Portable = false;
|
2022-01-05 17:20:25 +13:00
|
|
|
}
|
|
|
|
|
}
|