Auto comp (#6416)
This commit is contained in:
@@ -6,7 +6,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public class ActivatableUIRequiresPowerComponent : Component
|
||||
{
|
||||
public override string Name => "ActivatableUIRequiresPower";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,9 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.Power.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentProtoName("PowerProvider")]
|
||||
public class ApcPowerProviderComponent : BaseApcNetComponent
|
||||
{
|
||||
public override string Name => "PowerProvider";
|
||||
|
||||
[ViewVariables] public List<ApcPowerReceiverComponent> LinkedReceivers { get; } = new();
|
||||
|
||||
public void AddReceiver(ApcPowerReceiverComponent receiver)
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace Content.Server.Power.Components
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
public override string Name => "ApcPowerReceiver";
|
||||
|
||||
[ViewVariables]
|
||||
public bool Powered => (MathHelper.CloseToPercent(NetworkLoad.ReceivingPower, Load) || !NeedsPower) && !PowerDisabled;
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public class BatteryChargerComponent : BasePowerNetComponent
|
||||
{
|
||||
public override string Name => "BatteryCharger";
|
||||
|
||||
protected override void AddSelfToNet(IPowerNet net)
|
||||
{
|
||||
net.AddCharger(this);
|
||||
|
||||
@@ -15,8 +15,6 @@ namespace Content.Server.Power.Components
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
public override string Name => "Battery";
|
||||
|
||||
/// <summary>
|
||||
/// Maximum charge of the battery in joules (ie. watt seconds)
|
||||
/// </summary>
|
||||
|
||||
@@ -6,8 +6,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public class BatteryDischargerComponent : BasePowerNetComponent
|
||||
{
|
||||
public override string Name => "BatteryDischarger";
|
||||
|
||||
protected override void AddSelfToNet(IPowerNet net)
|
||||
{
|
||||
net.AddDischarger(this);
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public class BatterySelfRechargerComponent : Component
|
||||
{
|
||||
public override string Name => "BatterySelfRecharger";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)] [DataField("autoRecharge")] public bool AutoRecharge { get; set; }
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)] [DataField("autoRechargeRate")] public float AutoRechargeRate { get; set; }
|
||||
|
||||
@@ -7,8 +7,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public sealed class CableVisComponent : Component
|
||||
{
|
||||
public override string Name => "CableVis";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("node")]
|
||||
public string? Node;
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace Content.Server.Power.Components
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
public override string Name => "Charger";
|
||||
|
||||
[ViewVariables]
|
||||
public BatteryComponent? HeldBattery;
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace Content.Server.Power.Components
|
||||
public class ExaminableBatteryComponent : Component, IExamine
|
||||
#pragma warning restore 618
|
||||
{
|
||||
public override string Name => "ExaminableBattery";
|
||||
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
|
||||
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace Content.Server.Power.Components
|
||||
[Friend(typeof(ExtensionCableSystem))]
|
||||
public class ExtensionCableProviderComponent : Component
|
||||
{
|
||||
public override string Name => "ExtensionCableProvider";
|
||||
|
||||
/// <summary>
|
||||
/// The max distance this can connect to <see cref="ExtensionCableReceiverComponent"/>s from.
|
||||
/// </summary>
|
||||
|
||||
@@ -10,8 +10,6 @@ namespace Content.Server.Power.Components
|
||||
[Friend(typeof(ExtensionCableSystem))]
|
||||
public class ExtensionCableReceiverComponent : Component
|
||||
{
|
||||
public override string Name => "ExtensionCableReceiver";
|
||||
|
||||
[ViewVariables]
|
||||
public ExtensionCableProviderComponent? Provider { get; set; }
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public class PowerConsumerComponent : BaseNetConnectorComponent<IBasePowerNet>
|
||||
{
|
||||
public override string Name => "PowerConsumer";
|
||||
|
||||
/// <summary>
|
||||
/// How much power this needs to be fully powered.
|
||||
/// </summary>
|
||||
|
||||
@@ -15,8 +15,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public sealed class PowerNetworkBatteryComponent : Component
|
||||
{
|
||||
public override string Name => "PowerNetworkBattery";
|
||||
|
||||
[DataField("maxChargeRate")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MaxChargeRate
|
||||
|
||||
@@ -9,8 +9,6 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public class PowerSupplierComponent : BasePowerNetComponent
|
||||
{
|
||||
public override string Name => "PowerSupplier";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("supplyRate")]
|
||||
public float MaxSupply { get => NetworkSupply.MaxSupply; set => NetworkSupply.MaxSupply = value; }
|
||||
|
||||
Reference in New Issue
Block a user