Unstable 1.1.15.0

This commit is contained in:
Markus Isberg
2023-10-05 14:55:53 +03:00
parent cf8f0de659
commit 12e43d95ef
13 changed files with 50 additions and 45 deletions

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.1.14.0</Version>
<Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.1.14.0</Version>
<Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.1.14.0</Version>
<Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.1.14.0</Version>
<Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.1.14.0</Version>
<Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.1.14.0</Version>
<Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -25,7 +25,7 @@ namespace Barotrauma
if (connector is CircuitBoxOutputConnection output)
{
output.ReceiveSignal(signal);
return;
continue;
}
Connection.SendSignalIntoConnection(signal, connector.Connection);
}

View File

@@ -133,15 +133,13 @@ namespace Barotrauma
tempTargetItems.Clear();
foreach (var target in targets)
{
if (target is not Item item) { continue; }
if (itemTags.Any() && itemTags.None(item.HasTag) &&
itemIdentifierSplit.Any() && !itemIdentifierSplit.Contains(item.Prefab.Identifier))
if (target is not Item item) { continue; }
if (itemTags.Any(item.HasTag) || itemIdentifierSplit.Contains(item.Prefab.Identifier))
{
continue;
}
if (ConditionalsMatch(item, character: null))
{
tempTargetItems.Add(item);
if (ConditionalsMatch(item, character: null))
{
tempTargetItems.Add(item);
}
}
}
if (EnoughTargets(targetCount, tempTargetItems.Count))

View File

@@ -611,6 +611,8 @@ namespace Barotrauma
{
//round ended before the coroutine finished
if (GameMain.GameSession == null || Level.Loaded == null) { return; }
if (monster.Removed) { return; }
System.Diagnostics.Debug.Assert(GameMain.NetworkMember == null || GameMain.NetworkMember.IsServer, "Clients should not create monster events.");

View File

@@ -1,4 +1,5 @@
using Barotrauma.Networking;
using Barotrauma.Extensions;
using Barotrauma.Networking;
using FarseerPhysics;
using Microsoft.Xna.Framework;
using System;
@@ -181,24 +182,20 @@ namespace Barotrauma.Items.Components
if (hasPower)
{
var batteries = GetDirectlyConnectedBatteries().Where(static b => !b.OutputDisabled && b.Charge > 0.0001f && b.MaxOutPut > 0.0001f);
int batteryCount = batteries.Count();
if (batteryCount > 0)
float neededPower = PowerConsumption;
while (neededPower > 0.0001f && batteries.Any())
{
float neededPower = PowerConsumption;
while (neededPower > 0.0001f)
float takePower = neededPower / batteries.Count();
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries)
{
float takePower = neededPower / batteryCount;
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries)
{
neededPower -= takePower;
battery.Charge -= takePower / 3600.0f;
neededPower -= takePower;
battery.Charge -= takePower / 3600.0f;
#if SERVER
if (GameMain.Server != null) { battery.Item.CreateServerEvent(battery); }
if (GameMain.Server != null) { battery.Item.CreateServerEvent(battery); }
#endif
}
}
}
}
Discharge();
}
}

View File

@@ -773,28 +773,23 @@ namespace Barotrauma.Items.Components
if (!ignorePower)
{
var batteries = GetDirectlyConnectedBatteries().Where(static b => !b.OutputDisabled && b.Charge > 0.0001f && b.MaxOutPut > 0.0001f);
int batteryCount = batteries.Count();
if (batteryCount > 0)
float neededPower = GetPowerRequiredToShoot();
// tinkering is currently not factored into the common method as it is checked only when shooting
// but this is a minor issue that causes mostly cosmetic woes. might still be worth refactoring later
neededPower /= 1f + (tinkeringStrength * TinkeringPowerCostReduction);
while (neededPower > 0.0001f && batteries.Any())
{
float neededPower = GetPowerRequiredToShoot();
// tinkering is currently not factored into the common method as it is checked only when shooting
// but this is a minor issue that causes mostly cosmetic woes. might still be worth refactoring later
neededPower /= 1f + (tinkeringStrength * TinkeringPowerCostReduction);
while (neededPower > 0.0001f)
float takePower = neededPower / batteries.Count();
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries)
{
float takePower = neededPower / batteryCount;
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries)
{
neededPower -= takePower;
battery.Charge -= takePower / 3600.0f;
neededPower -= takePower;
battery.Charge -= takePower / 3600.0f;
#if SERVER
battery.Item.CreateServerEvent(battery);
battery.Item.CreateServerEvent(battery);
#endif
}
}
}
}
launchedProjectile = projectiles.FirstOrDefault();

View File

@@ -1378,6 +1378,9 @@ namespace Barotrauma
{
if (sub.Info.IsOutpost)
{
#if CLIENT
if (GameMain.GameSession.GameMode is TutorialMode) { continue; }
#endif
OutpostGenerator.PowerUpOutpost(sub);
}
}

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.1.15.0
-------------------------------------------------------------------------------------------------------------------------------------------------
- Fixed console errors when there are swarm feeders (or other monsters that immediately despawn when killed) in an irradiated level.
- Fixed occasional crashes when firing a turret makes a supercapacitor drop to 0% charge.
- Fixed circuit box only outputting to one pin when wired directly from input to multiple output pins.
- Fixed tutorial reactor starting already powered up, making the first engineer tutorial objectives complete immediately.
- Miscellaneous tutorial fixes.
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.1.14.0
-------------------------------------------------------------------------------------------------------------------------------------------------