diff --git a/Content.Server/PowerCell/PowerCellSystem.Draw.cs b/Content.Server/PowerCell/PowerCellSystem.Draw.cs index ae43b6dae9..9156d30b1f 100644 --- a/Content.Server/PowerCell/PowerCellSystem.Draw.cs +++ b/Content.Server/PowerCell/PowerCellSystem.Draw.cs @@ -28,7 +28,7 @@ public sealed partial class PowerCellSystem if (!TryGetBatteryFromSlot(uid, out var batteryEnt, out var battery, slot)) continue; - if (_battery.TryUseCharge(batteryEnt.Value, comp.DrawRate, battery)) + if (_battery.TryUseCharge(batteryEnt.Value, comp.DrawRate * (float)comp.Delay.TotalSeconds, battery)) continue; var ev = new PowerCellSlotEmptyEvent(); diff --git a/Content.Shared/PowerCell/PowerCellDrawComponent.cs b/Content.Shared/PowerCell/PowerCellDrawComponent.cs index 7af44420a7..cecf23d041 100644 --- a/Content.Shared/PowerCell/PowerCellDrawComponent.cs +++ b/Content.Shared/PowerCell/PowerCellDrawComponent.cs @@ -18,13 +18,13 @@ public sealed partial class PowerCellDrawComponent : Component /// /// Whether there is any charge available to draw. /// - [ViewVariables(VVAccess.ReadWrite), DataField("canDraw"), AutoNetworkedField] + [DataField, AutoNetworkedField] public bool CanDraw; /// /// Whether there is sufficient charge to use. /// - [ViewVariables(VVAccess.ReadWrite), DataField("canUse"), AutoNetworkedField] + [DataField, AutoNetworkedField] public bool CanUse; #endregion @@ -37,17 +37,20 @@ public sealed partial class PowerCellDrawComponent : Component public bool Enabled = true; /// - /// How much the entity draws while the UI is open. + /// How much the entity draws while the UI is open (in Watts). /// Set to 0 if you just wish to check for power upon opening the UI. /// - [ViewVariables(VVAccess.ReadWrite), DataField("drawRate")] + [DataField] public float DrawRate = 1f; /// - /// How much power is used whenever the entity is "used". + /// How much power is used whenever the entity is "used" (in Joules). /// This is used to ensure the UI won't open again without a minimum use power. /// - [ViewVariables(VVAccess.ReadWrite), DataField("useRate")] + /// + /// This is not a rate how the datafield name implies, but a one-time cost. + /// + [DataField] public float UseRate; ///