committed by
GitHub
parent
ea60a81fdf
commit
103bc19508
@@ -1,9 +1,7 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Server.Battery.Components;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Notification;
|
||||
using Content.Shared.Notification.Managers;
|
||||
using Content.Shared.Radiation;
|
||||
using Content.Shared.Singularity.Components;
|
||||
@@ -37,7 +35,6 @@ namespace Content.Server.Singularity.Components
|
||||
}
|
||||
|
||||
[ComponentDependency] private readonly BatteryComponent? _batteryComponent = default!;
|
||||
[ComponentDependency] private readonly BatteryDischargerComponent? _batteryDischargerComponent = default!;
|
||||
|
||||
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
@@ -74,12 +71,6 @@ namespace Content.Server.Singularity.Components
|
||||
if (_batteryComponent != null)
|
||||
{
|
||||
_batteryComponent!.CurrentCharge += frameTime * radiation.RadsPerSecond * 3000f;
|
||||
if (_batteryDischargerComponent != null)
|
||||
{
|
||||
// The battery discharger is controlled like this to ensure it won't drain the entire battery in a single tick.
|
||||
// If that occurs then the battery discharger ends up shutting down.
|
||||
_batteryDischargerComponent!.ActiveSupplyRate = (int) Math.Max(1, _batteryComponent!.CurrentCharge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user