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
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.1.14.0</Version> <Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.1.14.0</Version> <Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.1.14.0</Version> <Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.1.14.0</Version> <Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.1.14.0</Version> <Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.1.14.0</Version> <Version>1.1.15.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -25,7 +25,7 @@ namespace Barotrauma
if (connector is CircuitBoxOutputConnection output) if (connector is CircuitBoxOutputConnection output)
{ {
output.ReceiveSignal(signal); output.ReceiveSignal(signal);
return; continue;
} }
Connection.SendSignalIntoConnection(signal, connector.Connection); Connection.SendSignalIntoConnection(signal, connector.Connection);
} }
@@ -134,16 +134,14 @@ namespace Barotrauma
foreach (var target in targets) foreach (var target in targets)
{ {
if (target is not Item item) { continue; } if (target is not Item item) { continue; }
if (itemTags.Any() && itemTags.None(item.HasTag) && if (itemTags.Any(item.HasTag) || itemIdentifierSplit.Contains(item.Prefab.Identifier))
itemIdentifierSplit.Any() && !itemIdentifierSplit.Contains(item.Prefab.Identifier))
{ {
continue;
}
if (ConditionalsMatch(item, character: null)) if (ConditionalsMatch(item, character: null))
{ {
tempTargetItems.Add(item); tempTargetItems.Add(item);
} }
} }
}
if (EnoughTargets(targetCount, tempTargetItems.Count)) if (EnoughTargets(targetCount, tempTargetItems.Count))
{ {
TryApplyTagToItems(tempTargetItems); TryApplyTagToItems(tempTargetItems);
@@ -612,6 +612,8 @@ namespace Barotrauma
//round ended before the coroutine finished //round ended before the coroutine finished
if (GameMain.GameSession == null || Level.Loaded == null) { return; } 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."); System.Diagnostics.Debug.Assert(GameMain.NetworkMember == null || GameMain.NetworkMember.IsServer, "Clients should not create monster events.");
Vector2 pos = spawnPos.Value + Rand.Vector(scatterAmount); Vector2 pos = spawnPos.Value + Rand.Vector(scatterAmount);
@@ -1,4 +1,5 @@
using Barotrauma.Networking; using Barotrauma.Extensions;
using Barotrauma.Networking;
using FarseerPhysics; using FarseerPhysics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using System; using System;
@@ -181,13 +182,10 @@ namespace Barotrauma.Items.Components
if (hasPower) if (hasPower)
{ {
var batteries = GetDirectlyConnectedBatteries().Where(static b => !b.OutputDisabled && b.Charge > 0.0001f && b.MaxOutPut > 0.0001f); 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; float neededPower = PowerConsumption;
while (neededPower > 0.0001f) while (neededPower > 0.0001f && batteries.Any())
{ {
float takePower = neededPower / batteryCount; float takePower = neededPower / batteries.Count();
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut))); takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries) foreach (PowerContainer battery in batteries)
{ {
@@ -198,7 +196,6 @@ namespace Barotrauma.Items.Components
#endif #endif
} }
} }
}
Discharge(); Discharge();
} }
} }
@@ -773,16 +773,13 @@ namespace Barotrauma.Items.Components
if (!ignorePower) if (!ignorePower)
{ {
var batteries = GetDirectlyConnectedBatteries().Where(static b => !b.OutputDisabled && b.Charge > 0.0001f && b.MaxOutPut > 0.0001f); 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(); float neededPower = GetPowerRequiredToShoot();
// tinkering is currently not factored into the common method as it is checked only when shooting // 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 // but this is a minor issue that causes mostly cosmetic woes. might still be worth refactoring later
neededPower /= 1f + (tinkeringStrength * TinkeringPowerCostReduction); neededPower /= 1f + (tinkeringStrength * TinkeringPowerCostReduction);
while (neededPower > 0.0001f) while (neededPower > 0.0001f && batteries.Any())
{ {
float takePower = neededPower / batteryCount; float takePower = neededPower / batteries.Count();
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut))); takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries) foreach (PowerContainer battery in batteries)
{ {
@@ -795,8 +792,6 @@ namespace Barotrauma.Items.Components
} }
} }
}
launchedProjectile = projectiles.FirstOrDefault(); launchedProjectile = projectiles.FirstOrDefault();
Item container = launchedProjectile?.Item.Container; Item container = launchedProjectile?.Item.Container;
if (container != null) if (container != null)
@@ -1378,6 +1378,9 @@ namespace Barotrauma
{ {
if (sub.Info.IsOutpost) if (sub.Info.IsOutpost)
{ {
#if CLIENT
if (GameMain.GameSession.GameMode is TutorialMode) { continue; }
#endif
OutpostGenerator.PowerUpOutpost(sub); OutpostGenerator.PowerUpOutpost(sub);
} }
} }
+10
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 v1.1.14.0
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------