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);
} }
@@ -133,15 +133,13 @@ namespace Barotrauma
tempTargetItems.Clear(); tempTargetItems.Clear();
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))
@@ -611,6 +611,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.");
@@ -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,24 +182,20 @@ 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(); float neededPower = PowerConsumption;
if (batteryCount > 0) while (neededPower > 0.0001f && batteries.Any())
{ {
float neededPower = PowerConsumption; float takePower = neededPower / batteries.Count();
while (neededPower > 0.0001f) takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
foreach (PowerContainer battery in batteries)
{ {
float takePower = neededPower / batteryCount; neededPower -= takePower;
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut))); battery.Charge -= takePower / 3600.0f;
foreach (PowerContainer battery in batteries)
{
neededPower -= takePower;
battery.Charge -= takePower / 3600.0f;
#if SERVER #if SERVER
if (GameMain.Server != null) { battery.Item.CreateServerEvent(battery); } if (GameMain.Server != null) { battery.Item.CreateServerEvent(battery); }
#endif #endif
}
} }
} }
Discharge(); Discharge();
} }
} }
@@ -773,28 +773,23 @@ 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(); float neededPower = GetPowerRequiredToShoot();
if (batteryCount > 0) // 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(); float takePower = neededPower / batteries.Count();
// tinkering is currently not factored into the common method as it is checked only when shooting takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut)));
// but this is a minor issue that causes mostly cosmetic woes. might still be worth refactoring later foreach (PowerContainer battery in batteries)
neededPower /= 1f + (tinkeringStrength * TinkeringPowerCostReduction);
while (neededPower > 0.0001f)
{ {
float takePower = neededPower / batteryCount; neededPower -= takePower;
takePower = Math.Min(takePower, batteries.Min(b => Math.Min(b.Charge * 3600.0f, b.MaxOutPut))); battery.Charge -= takePower / 3600.0f;
foreach (PowerContainer battery in batteries)
{
neededPower -= takePower;
battery.Charge -= takePower / 3600.0f;
#if SERVER #if SERVER
battery.Item.CreateServerEvent(battery); battery.Item.CreateServerEvent(battery);
#endif #endif
}
} }
} }
} }
launchedProjectile = projectiles.FirstOrDefault(); launchedProjectile = projectiles.FirstOrDefault();
@@ -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
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------