Unstable 0.16.3.0

This commit is contained in:
Markus Isberg
2022-02-10 02:52:08 +09:00
parent 6814a11520
commit 2190fe08ef
115 changed files with 993 additions and 453 deletions
@@ -118,6 +118,7 @@ namespace Barotrauma.Items.Components
if (character != null && !CharacterUsable) { return false; }
CurrPowerConsumption = powerConsumption;
Voltage = 0.0f;
charging = true;
timer = Duration;
IsActive = true;
@@ -141,7 +142,7 @@ namespace Barotrauma.Items.Components
timer -= deltaTime;
if (charging)
{
if (GetAvailableBatteryPower() >= powerConsumption)
if (GetAvailableInstantaneousBatteryPower() >= powerConsumption)
{
var batteries = item.GetConnectedComponents<PowerContainer>();
float neededPower = powerConsumption;