diff --git a/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs b/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs
index bbf59f241..7ee5b8499 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs
@@ -752,8 +752,9 @@ namespace Barotrauma
float radialDistortStrength = 0.0f;
float chromaticAberrationStrength = 0.0f;
float grainStrength = 0.0f;
- Color grainColor = Color.White;
+ Color grainColor = Color.Transparent;
+ float oxygenLowStrength = 0.0f;
if (Character.IsUnconscious)
{
blurStrength = 1.0f;
@@ -761,14 +762,13 @@ namespace Barotrauma
}
else if (OxygenAmount < 100.0f)
{
- // TODO disable some of these?
- blurStrength = MathHelper.Lerp(0.5f, 1.0f, 1.0f - Vitality / MaxVitality);
- distortStrength = blurStrength;
- distortSpeed = (blurStrength + 1.0f);
+ oxygenLowStrength = Math.Min(1.0f - (OxygenAmount - LowOxygenThreshold) / LowOxygenThreshold, 1.0f);
+ blurStrength = MathHelper.Lerp(0.5f, 1.0f, 1.0f - Vitality / MaxVitality) * oxygenLowStrength;
+ distortStrength = blurStrength * oxygenLowStrength;
+ distortSpeed = blurStrength + 1.0f;
distortSpeed *= distortSpeed * distortSpeed * distortSpeed;
-
-
- grainStrength = MathHelper.Lerp(0.5f, 10.0f, 1.0f - (OxygenAmount - LowOxygenThreshold) / LowOxygenThreshold);
+
+ grainStrength = MathHelper.Lerp(0.5f, 10.0f, oxygenLowStrength);
grainColor = oxygenLowGrainColor;
}
@@ -778,7 +778,12 @@ namespace Barotrauma
blurStrength = Math.Max(blurStrength, affliction.GetScreenBlurStrength());
radialDistortStrength = Math.Max(radialDistortStrength, affliction.GetRadialDistortStrength());
chromaticAberrationStrength = Math.Max(chromaticAberrationStrength, affliction.GetChromaticAberrationStrength());
- grainStrength = Math.Max(grainStrength, affliction.GetScreenGrainStrength());
+ float afflictionGrainStrength = affliction.GetScreenGrainStrength();
+ if (afflictionGrainStrength > 0.0f)
+ {
+ grainStrength = Math.Max(grainStrength, affliction.GetScreenGrainStrength());
+ grainColor = Color.Lerp(grainColor, Color.White, (float)Math.Pow(1.0f - oxygenLowStrength, 2));
+ }
}
foreach (LimbHealth limbHealth in limbHealths)
{
diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs
index f8d583f84..826ab5f91 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs
@@ -822,7 +822,7 @@ namespace Barotrauma
{
parent.Content.ClearChildren();
currentUpgradeCategory = category;
- var entitiesOnSub = submarine.GetItems(true).Where(i => submarine.IsEntityFoundOnThisSub(i, true) && !i.HiddenInGame && i.AllowSwapping && category.ItemTags.Any(t => i.HasTag(t))).ToList();
+ var entitiesOnSub = submarine.GetItems(true).Where(i => submarine.IsEntityFoundOnThisSub(i, true) && !i.HiddenInGame && i.AllowSwapping && i.Prefab.SwappableItem != null && category.ItemTags.Any(t => i.HasTag(t))).ToList();
int slotIndex = 0;
foreach (Item item in entitiesOnSub)
@@ -872,7 +872,7 @@ namespace Barotrauma
{
bool canUninstall = item.PendingItemSwap != null || !string.IsNullOrEmpty(currentOrPending.SwappableItem?.ReplacementOnUninstall);
- bool isUninstallPending = item.PendingItemSwap?.Identifier == item.Prefab.SwappableItem.ReplacementOnUninstall;
+ bool isUninstallPending = item.Prefab.SwappableItem != null && item.PendingItemSwap?.Identifier == item.Prefab.SwappableItem.ReplacementOnUninstall;
if (isUninstallPending) { canUninstall = false; }
frames.Add(CreateUpgradeEntry(rectT(1f, 0.25f, parent.Content), currentOrPending.UpgradePreviewSprite,
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs
index 89a6b1210..63235d0d5 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs
@@ -297,11 +297,11 @@ namespace Barotrauma
SlotSize = !isFourByThree ? (SlotSpriteSmall.size * UIScale).ToPoint() : (SlotSpriteSmall.size * UIScale * .925f).ToPoint();
int bottomOffset = SlotSize.Y + Spacing * 2 + ContainedIndicatorHeight;
+ hideButton.Visible = false;
+
if (visualSlots == null) { CreateSlots(); }
if (visualSlots.None()) { return; }
- hideButton.Visible = false;
-
switch (layout)
{
case Layout.Default:
@@ -1103,6 +1103,7 @@ namespace Barotrauma
public void DrawOwn(SpriteBatch spriteBatch)
{
if (!AccessibleWhenAlive && !character.IsDead) { return; }
+ if (capacity == 0) { return; }
if (visualSlots == null) { CreateSlots(); }
if (GameMain.GraphicsWidth != screenResolution.X ||
GameMain.GraphicsHeight != screenResolution.Y ||
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Particles/Particle.cs b/Barotrauma/BarotraumaClient/ClientSource/Particles/Particle.cs
index 956c3e104..3a4852708 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Particles/Particle.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Particles/Particle.cs
@@ -421,21 +421,32 @@ namespace Barotrauma.Particles
private void ApplyDrag(float dragCoefficient, float deltaTime)
{
+ Vector2 relativeVel = velocity;
+ if (currentHull?.Submarine != null)
+ {
+ relativeVel = velocity - ConvertUnits.ToDisplayUnits(currentHull.Submarine.Velocity);
+ }
- float speed = velocity.Length();
- velocity /= speed;
+ float speed = relativeVel.Length();
+
+ relativeVel /= speed;
float drag = speed * speed * dragCoefficient * 0.01f * deltaTime;
if (drag > speed)
{
- velocity = Vector2.Zero;
+ relativeVel = Vector2.Zero;
}
else
{
speed -= drag;
- velocity *= speed;
+ relativeVel *= speed;
}
+ velocity = relativeVel;
+ if (currentHull?.Submarine != null)
+ {
+ velocity += ConvertUnits.ToDisplayUnits(currentHull.Submarine.Velocity);
+ }
}
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignUI.cs b/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignUI.cs
index 2a07d654a..3c55ebd3e 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignUI.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignUI.cs
@@ -607,7 +607,8 @@ namespace Barotrauma
missionList.UpdateScrollBarSize();
}
}
- UpdateMaxMissions(connection.OtherLocation(currentDisplayLocation));
+ var destination = connection.OtherLocation(currentDisplayLocation);
+ UpdateMaxMissions(destination);
var buttonArea = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.05f), content.RectTransform), isHorizontal: true);
@@ -615,7 +616,7 @@ namespace Barotrauma
{
TextGetter = () =>
{
- return TextManager.AddPunctuation(':', TextManager.Get("Missions"), $"{Campaign.NumberOfMissionsAtLocation(Campaign.GetCurrentDisplayLocation())}/{Campaign.Settings.MaxMissionCount}");
+ return TextManager.AddPunctuation(':', TextManager.Get("Missions"), $"{Campaign.NumberOfMissionsAtLocation(destination)}/{Campaign.Settings.MaxMissionCount}");
}
};
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index 08278ea16..25f466358 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.14.4.0
+ 0.14.5.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 55e4f0cba..1950f7654 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.14.4.0
+ 0.14.5.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index 3984442e8..f956bb08f 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.14.4.0
+ 0.14.5.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index 86da86dd9..76df888c4 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.14.4.0
+ 0.14.5.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index 5bd315fdf..c3b5fd3b4 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.14.4.0
+ 0.14.5.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index a483f6318..ae18fc4cf 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.14.4.0
+ 0.14.5.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Order.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Order.cs
index 3d3a7acb4..09a73221f 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Order.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Order.cs
@@ -525,7 +525,15 @@ namespace Barotrauma
public string GetOptionName(string id)
{
- return Prefab == null ? OptionNames[id] : Prefab.OptionNames[id];
+ if (Prefab == null)
+ {
+ if (OptionNames.ContainsKey(id)) { return OptionNames[id]; }
+ }
+ else
+ {
+ if (Prefab.OptionNames.ContainsKey(id)) { return Prefab.OptionNames[id]; }
+ }
+ return string.Empty;
}
public string GetOptionName(int index)
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Wreck/WreckAI.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Wreck/WreckAI.cs
index ed3d7dd97..e7df09aa5 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Wreck/WreckAI.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Wreck/WreckAI.cs
@@ -37,7 +37,14 @@ namespace Barotrauma
private static bool IsThalamus(MapEntityPrefab entityPrefab, string tag) => entityPrefab.HasSubCategory("thalamus") || entityPrefab.Tags.Contains(tag);
- public WreckAI(Submarine wreck)
+ public static WreckAI Create(Submarine wreck)
+ {
+ var wreckAI = new WreckAI(wreck);
+ if (wreckAI.Config == null) { return null; }
+ return wreckAI;
+ }
+
+ private WreckAI(Submarine wreck)
{
Wreck = wreck;
Config = WreckAIConfig.GetRandom();
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
index c1bac70ad..1e7a4d476 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
@@ -2990,11 +2990,14 @@ namespace Barotrauma
Spawner.AddToRemoveQueue(this);
}
- public void DespawnNow()
+ public void DespawnNow(bool createNetworkEvents = true)
{
despawnTimer = GameMain.Config.CorpseDespawnDelay;
UpdateDespawn(1.0f, ignoreThresholds: true);
- Spawner.Update();
+ if (createNetworkEvents)
+ {
+ Spawner.Update();
+ }
}
public static void RemoveByPrefab(CharacterPrefab prefab)
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/CharacterHealth.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/CharacterHealth.cs
index 02a6775f4..ad2d820c5 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/CharacterHealth.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Health/CharacterHealth.cs
@@ -627,7 +627,10 @@ namespace Barotrauma
Kill();
}
#if CLIENT
- selectedLimbIndex = -1;
+ if (CharacterHealth.OpenHealthWindow != this)
+ {
+ selectedLimbIndex = -1;
+ }
#endif
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Extensions/IEnumerableExtensions.cs b/Barotrauma/BarotraumaShared/SharedSource/Extensions/IEnumerableExtensions.cs
index 11ddb0f12..c3d164708 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Extensions/IEnumerableExtensions.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Extensions/IEnumerableExtensions.cs
@@ -154,5 +154,22 @@ namespace Barotrauma.Extensions
{
if (value != null) { source.Add(value); }
}
+
+ ///
+ /// Returns whether a given collection has at least a certain amount
+ /// of elements for which the predicate returns true.
+ ///
+ /// Input collection
+ /// How many elements to match before stopping
+ /// Predicate used to evaluate the elements
+ public static bool AtLeast(this IEnumerable source, int amount, Predicate predicate)
+ {
+ foreach (T elem in source)
+ {
+ if (predicate(elem)) { amount--; }
+ if (amount <= 0) { return true; }
+ }
+ return false;
+ }
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs b/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs
index 300a5ce2b..cddcb7b94 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs
@@ -599,7 +599,7 @@ namespace Barotrauma
if (c.IsDead)
{
CrewManager.RemoveCharacterInfo(c.Info);
- c.DespawnNow();
+ c.DespawnNow(createNetworkEvents: false);
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Reactor.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Reactor.cs
index 6c80e925d..109645fc6 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Reactor.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Reactor.cs
@@ -783,7 +783,7 @@ namespace Barotrauma.Items.Components
case "set_fissionrate":
if (PowerOn && float.TryParse(signal.value, NumberStyles.Float, CultureInfo.InvariantCulture, out float newFissionRate))
{
- targetFissionRate = newFissionRate;
+ targetFissionRate = MathHelper.Clamp(newFissionRate, 0.0f, 100.0f);
if (GameMain.NetworkMember?.IsServer ?? false) { unsentChanges = true; }
#if CLIENT
FissionRateScrollBar.BarScroll = targetFissionRate / 100.0f;
@@ -793,7 +793,7 @@ namespace Barotrauma.Items.Components
case "set_turbineoutput":
if (PowerOn && float.TryParse(signal.value, NumberStyles.Float, CultureInfo.InvariantCulture, out float newTurbineOutput))
{
- targetTurbineOutput = newTurbineOutput;
+ targetTurbineOutput = MathHelper.Clamp(newTurbineOutput, 0.0f, 100.0f);
if (GameMain.NetworkMember?.IsServer ?? false) { unsentChanges = true; }
#if CLIENT
TurbineOutputScrollBar.BarScroll = targetTurbineOutput / 100.0f;
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Power/PowerTransfer.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Power/PowerTransfer.cs
index 84302e52a..1828f7cee 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Power/PowerTransfer.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Power/PowerTransfer.cs
@@ -359,7 +359,7 @@ namespace Barotrauma.Items.Components
{
//other junction boxes don't need to receive the signal in the pass-through signal connections
//because we relay it straight to the connected items without going through the whole chain of junction boxes
- if (ic is PowerTransfer && !(ic is RelayComponent) && connection.Name.Contains("signal")) { continue; }
+ if (ic is PowerTransfer && !(ic is RelayComponent)) { continue; }
ic.ReceiveSignal(signal, recipient);
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/Signal.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/Signal.cs
index c3c007b44..6680d82ff 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/Signal.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/Signal.cs
@@ -19,5 +19,22 @@ namespace Barotrauma.Items.Components
this.power = power;
this.strength = strength;
}
+
+ internal Signal WithStepsTaken(int stepsTaken)
+ {
+ Signal retVal = this;
+ retVal.stepsTaken = stepsTaken;
+ return retVal;
+ }
+
+ public static bool operator==(Signal a, Signal b) =>
+ a.value == b.value &&
+ a.stepsTaken == b.stepsTaken &&
+ a.sender == b.sender &&
+ a.source == b.source &&
+ MathUtils.NearlyEqual(a.power, b.power) &&
+ MathUtils.NearlyEqual(a.strength, b.strength);
+
+ public static bool operator!=(Signal a, Signal b) => !(a == b);
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/TrigonometricFunctionComponent.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/TrigonometricFunctionComponent.cs
index 8588d9bdd..7d3e3caad 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/TrigonometricFunctionComponent.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/TrigonometricFunctionComponent.cs
@@ -64,6 +64,7 @@ namespace Barotrauma.Items.Components
public override void ReceiveSignal(Signal signal, Connection connection)
{
float.TryParse(signal.value, NumberStyles.Float, CultureInfo.InvariantCulture, out float value);
+ bool sendOutputImmediately = true;
switch (Function)
{
case FunctionType.Sin:
@@ -105,11 +106,13 @@ namespace Barotrauma.Items.Components
{
timeSinceReceived[0] = 0.0f;
float.TryParse(signal.value, NumberStyles.Float, CultureInfo.InvariantCulture, out receivedSignal[0]);
+ sendOutputImmediately = false;
}
else if (connection.Name == "signal_in_y")
{
timeSinceReceived[1] = 0.0f;
float.TryParse(signal.value, NumberStyles.Float, CultureInfo.InvariantCulture, out receivedSignal[1]);
+ sendOutputImmediately = false;
}
else
{
@@ -121,9 +124,11 @@ namespace Barotrauma.Items.Components
default:
throw new NotImplementedException($"Function {Function} has not been implemented.");
}
-
- signal.value = value.ToString("G", CultureInfo.InvariantCulture);
- item.SendSignal(signal, "signal_out");
+ if (sendOutputImmediately)
+ {
+ signal.value = value.ToString("G", CultureInfo.InvariantCulture);
+ item.SendSignal(signal, "signal_out");
+ }
}
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs
index 09aa00461..d93664572 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs
@@ -2005,26 +2005,36 @@ namespace Barotrauma
SendSignal(signal, connection);
}
+ private readonly HashSet<(Signal Signal, Connection Connection)> delayedSignals = new HashSet<(Signal Signal, Connection Connection)>();
+
public void SendSignal(Signal signal, Connection connection)
{
LastSentSignalRecipients.Clear();
if (connections == null || connection == null) { return; }
signal.stepsTaken++;
-
+
+ //if the signal has been passed through this item multiple times already, interrupt it to prevent infinite loops
+ if (signal.stepsTaken > 5 && signal.source != null)
+ {
+ if (signal.source.LastSentSignalRecipients.AtLeast(3, recipient => recipient == connection))
+ {
+ return;
+ }
+ }
+
+ //use a coroutine to prevent infinite loops by creating a one
+ //frame delay if the "signal chain" gets too long
if (signal.stepsTaken > 10)
{
- //if the signal has been passed through this item multiple times already, interrupt it to prevent infinite loops
- if (signal.source != null)
+ //if there's an equal signal waiting to be sent
+ //to the same connection, don't add a new one
+ signal.stepsTaken = 0;
+ if (!delayedSignals.Contains((signal, connection)))
{
- if (signal.source.LastSentSignalRecipients.Count(recipient => recipient == connection) > 2)
- {
- return;
- }
+ delayedSignals.Add((signal, connection));
+ CoroutineManager.StartCoroutine(DelaySignal(signal, connection));
}
- //use a coroutine to prevent infinite loops by creating a one
- //frame delay if the "signal chain" gets too long
- CoroutineManager.StartCoroutine(DelaySignal(signal, connection));
}
else
{
@@ -2045,7 +2055,8 @@ namespace Barotrauma
//wait one frame
yield return CoroutineStatus.Running;
- signal.stepsTaken = 0;
+ delayedSignals.Remove((signal, connection));
+
signal.source = this;
connection.SendSignal(signal);
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs
index 3ac28ec97..143f60816 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs
@@ -374,7 +374,7 @@ namespace Barotrauma
public WreckAI WreckAI { get; private set; }
public bool CreateWreckAI()
{
- WreckAI = new WreckAI(this);
+ WreckAI = WreckAI.Create(this);
return WreckAI != null;
}
@@ -1570,7 +1570,7 @@ namespace Barotrauma
Rectangle dimensions = CalculateDimensions();
element.Add(new XAttribute("dimensions", XMLExtensions.Vector2ToString(dimensions.Size.ToVector2())));
var cargoContainers = GetCargoContainers();
- element.Add(new XAttribute("cargocapacity", cargoContainers.Sum(c => c.freeSlots)));
+ element.Add(new XAttribute("cargocapacity", cargoContainers.Sum(c => c.container.Capacity)));
element.Add(new XAttribute("recommendedcrewsizemin", Info.RecommendedCrewSizeMin));
element.Add(new XAttribute("recommendedcrewsizemax", Info.RecommendedCrewSizeMax));
element.Add(new XAttribute("recommendedcrewexperience", Info.RecommendedCrewExperience ?? ""));
diff --git a/Barotrauma/BarotraumaShared/Submarines/Typhon2.sub b/Barotrauma/BarotraumaShared/Submarines/Typhon2.sub
index f3e02a871..6eaf45b30 100644
Binary files a/Barotrauma/BarotraumaShared/Submarines/Typhon2.sub and b/Barotrauma/BarotraumaShared/Submarines/Typhon2.sub differ
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index 80851ac36..184b375a5 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,229 +1,44 @@
---------------------------------------------------------------------------------------------------------
-v0.14.4.0 (unstable)
+v0.14.5.0
---------------------------------------------------------------------------------------------------------
-Changes:
-- Restrict the number of missions you can choose per level to 2.
-- Removed Endworm's weak point in the mouth.
-- Alien/physicorium shells now break the limbs again, like they used to. Reduced the damage from 1000 to 800.
-- Pulse laser doesn't bypass all the damagemodifiers anymore (because it uses burndamage instead of burn). Increased the damage slightly.
-
-Fixes:
-- Fixed some incorrect room names in the beacon stations.
-- Fixed propeller damage area triggering very inaccurately, particularly on shuttle engines.
-- Fixed hull indicators fading in when loading a sub in the editor (they should only get hidden and fade in when editing the ambient light value).
-- Fixed inability to override jobs with mods (unstable only).
-- Fixed rotated levelobjects emitting particles in a wrong direction (e.g. cave vents).
-- Fixed LevelTriggers staying active when the character who activated them leaves them (e.g. gas vents draining oxygen even after you've left their trigger area). Unstable only.
-- Removed duplicate front piece from pirate Humpback.
-- Fixed boss health bar not showing up when damaging boss monsters with the pulse laser.
-- Fixed gaps sometimes getting linked incorrectly to the hulls between docking hatches, preventing water from flowing down from the lower hull in mirrored subs. Happened in mirrored Kastrull for example.
-- Fixed fires in hulls between docking ports never going out client-side.
-- Fixed Moloch's armor not always breaking when shot with a railgun.
-- Fixed Moloch's armor breaking when shot with canister shots or chainguns.
-- Fixed the armor penetration of railgun shell not working.
-- Fixed a crash related to bots entering dry rooms inside alien ruins. (unstable only)
-- Fixed nav terminal's, sonar monitor's and status monitor's selection rectangles being offset from the sprite in the sub editor.
-- Fixed mirrored pumps emitting particles from the wrong side of the pump.
-- Fixed turret icon not switching back to the previous one in the sub preview when cancelling a pending turret upgrade.
-- Fixed occasional "sequence contains no elements" crash when updating pirate AI.
-- Fixed occasional "index out of range" console errors when a client receives an update about the pirates' AI state.
-
----------------------------------------------------------------------------------------------------------
-v0.1400.3.0 (unstable)
----------------------------------------------------------------------------------------------------------
-
-Changes:
-- Increased the health of the hammerhead mission variants to match the previous buff of the default characters.
-- Made it possible to sell items on the sub through a new store tab in singleplayer.
-- Miscellaneous improvements and fixes to the new scripted events.
-- Allow clicking on the main menu buttons when the credits are open.
-- Added a dummy lightcomponent to turret hardpoints to make it possible to adjust the properties of the lights that will be installed on the hardpoint.
-- Option to adjust motion sensor's update interval in the sub editor.
-- Display pirate subs in a separate category in the sub editor.
-- Escortees spawn at a spawnpoint suitable for their job if one is found. Shouldn't have an effect in the vanilla subs because they don't have specific spawnpoints for the escortees' jobs.
-
-Fixes:
-- Fixed pirate subs getting crushed by pressure in levels later in the campaign.
-- Hide the event variant of the psychosis artifact in the sub editor.
-- Fixed less suitable characters getting quick-assigned for an order (e.g. captain getting assigned the "operate reactor" order).
-- Fixed missions sometimes unlocking in paths leading to an irradiated location even if there's a more suitable path available.
-- Fixed some campaign-specific scripted events triggering in abandoned outposts in the mission mode.
-- Fixed mudraptors no longer targeting doors.
-- Fixed white rectangle around selected items in the sub editor being slightly off if the item's position/size is not a whole number.
-- Fixed "incorrect password" text overlapping with the buttons in the password prompt.
-- Fixed "could not parse taken container index" error when stealing items that didn't spawn in a container in an outpost and returning to that outpost.
-- Fixed z-fighting in Medium Weapons Display Case.
-- Fixed inability to drop through broken hatches.
-- Fixed sprite bleed in IC-4 block's inventory icon.
-- Fixed damage modifiers in item tooltips always starting with a minus sign even if the modifier is positive, and skill modifiers always starting with "+".
-- Fixed healthbar and affliction area being clickable even if there's an UI element in front of them, and even if there's no afflictions in the affliction area. Most noticeable when editing an electrical components properties.
-
----------------------------------------------------------------------------------------------------------
-v0.1400.2.0 (unstable)
----------------------------------------------------------------------------------------------------------
-
-Changes:
-- Further improvements/balancing to the pulse laser and chaingun, including sounds and improved particle effects.
-- Adjusted the amount of loot in pirate subs.
-- Motion detectors that are set to detect wall can also detect other submarines.
-- Doors/hatches can be damaged by projectiles.
-- The loaders for newly purchased weapons spawn with one free ammo box.
-- Improvements to the weapon customization menu.
-- Hammerhead and Golden Hammerhead: Increased health, added some protection on claws and the tail end. Slightly increase the slow swimming speed and animations. The claws don't break anymore when shot with coilgun.
-- Hammerheads and Husks don't avoid gun fire anymore. Pets now avoid gun fire.
-
-Fixes:
-- Fixed upgrades resetting if you return to an outpost after purchasing upgrades.
-- Draw coilgun and railgun muzzle flashes in front of subs.
-- Fixed motion detectors detecting level walls unreliably.
-- Fixed characters triggering motion sensors that are only set to be triggered by walls.
-- Fixed items taken from abandoned outposts sometimes reappearing when returning to the outpost.
-- Fixed highlighting items sometimes breaking after dropping a metal crate or some other container whose inventory is always visible when the item is equipped.
-- Fixed bots putting minerals in the closest locker instead of preferring those that have been tagged with the "mineralcontainer" tag
-- Fixed bots not respecting the access restrictions when choosing a where to put items into.
-- Fixed bots being able to take items from secure cabinets if the item is inside another container inside the cabinet.
-- Fixes to hull generation between docking ports. Should fix tiny gaps between the hulls that caused characters to briefly teleport outside the sub when passing through the port, and hulls generating incorrectly when the main submarine has hulls at both sides of the docking port.
-- Fixed captain's pipe, harmonica and pipe tobacco not spawning in crates when purchased.
-- Fixed console errors when trying to overwrite an existing item assembly in the sub editor.
-- Fixed the margin calculations that in some cases made it impossible for Bonethreshers (and possibly other monsters) to reach a moving target.
-- Fixed CargoManager only spawning one crate of each type and dropping the rest of the items on the floor in multiplayer.
-- Fixed abyss monsters sometimes being unable to hit the sub and just keep pushing the sub.
-- Define "tool", "weapon", and "provocative" targeting params to be ignored if the creature is not in the same sub as the target. Fixes some odd cases where the monsters e.g. target some item inside the sub when they are outside.
-- Fixed occasional excessive camera shake when a large monster is lodged between the sub and the level.
-- Fixed ballast flora not getting cleared from respawn shuttles when the shuttle despawns.
-- Fixed ability to leave the level with a pirate sub.
-- Fixed turret hardpoints appearing in the minimap view when giving an Operate Weapons order.
-- Fixed ability to switch back to a sub you've left behind using the outpost terminals.
-- Fixed doors without integrated buttons getting instantly opened by clicking on them when you have access to the button.
-- Fixed chaingun barrel's sprite depth not being affected by the depth of the item, causing the barrels to be drawn in front of the item if it's depth is larger than 0.13.
-- Fixed ability to switch control to the hostages with Z and X keys during hostage missions.
-- Fixed abyss and combat suits not getting autofilled with oxygen tanks when placing the initial supplies to a sub.
-- Fixed previously selected missions reappearing when you retry a level, even though they don't show up in the mission selection menu.
-- Fixed inability to type in the "max players" field in the "host server" tab.
-- Fixed rotated weapons with a different origin getting misaligned when swapping them.
-- Fixed item sell quantity sometimes appearing "maxed out" at a quantity less than what the player is actually selling.
-- Fixed crashing when the team id argument for the "spawn" console command is formatted incorrectly, mention the argument in the command's help text.
-- Docking port whack-a-mole part n: fixed respawn shuttle's ports not showing up on the sonar.
-- More descriptive error message when a client fails to spawn an entity due to it's ID being taken up by something else ("Failed to read event for entity EntitySpawner (ID xxx taken by yyyy)").
-- Fixed cargo mission reward displaying as 0 in the popups at the start of a round.
-- Fixed clients being able to toggle missions on/off without campaign management permissions.
-- Fixed bots trying to clean up seeds and put items into bags that were moved to somewhere the bot can't access them, causing the bot to be stuck trying to reach the target.
-- Fixed wrecks and beacons sometimes spawning too close to the start and end positions when there's no outpost present.
-- Fixed "Ignore This" order affecting all NPCs. It should only affect the bots in a player team.
-- Fixed "Ignore This" order restricting player access to doors.
-- Fixed bots targeting same targets when fixing/repairing.
-- Fixed monsters sometimes getting stuck "dancing" near the submarine because they try to avoid and target it at the same time.
-- Fixed cold caverns always having a wreck. There's now 50% chance for a wreck in cold caverns.
-- Monster events: Fixed many higher difficulty subsets spawning multiple monster events when they should spawn only one
-- Monster events: Fixed Watcher spawns post difficulty level 20 trigger the event cooldown when they shouldn't
-- Fixed inability to talk to the "Husk Cultist" event NPC when returning to them a second time. (Other events could have been affected, too.)
-- Fixed security guards starting to shoot each other if one of them accidentally does damage on any friendly character (Only unstable).
+- Fixed deconstructing chaingun/laser ammo boxes not giving back aluminium.
+- Fixes certain particles (e.g. flare) "dragging behind" inside moving subs.
+- Fixed Typhon 2's railgun not being connected to the loader.
+- Fixed occasional "failed to read event for xxx" errors when syncing a pirate's AI state in multiplayer.
+- Fixed atan components working unreliably when using the separate x/y inputs.
+- Fixed missing prisoner outfit sprite.
+- Crates pre-placed into a submarine's cargo containers or ULD's aren't taken into account when calculating the cargo capacity to display in the submarine preview.
+- Fixed limbs getting automatically deselected in the health interface when receiving a new affliction (most noticeable when trying to heal an affliction that's being continuously applied on the character, e.g. burns caused by radiation).
+- Added a missing hull to beacon station's airlock room.
+- Fixed inventory toggle button being rendered in the top-left corner of the screen when grabbing a character with a 0-capacity inventory (such as a hatchling).
+- Fixed an exploit that allowed crashing the game using certain looping circuits that involve trigonometric function components.
+- Removed underwater explosion particle effect when vomiting underwater.
+- Fixed screen noise effect cutting from white to black with no blending when the oxygen low affliction kicks in while the white noise effect (e.g. radiation sickness) is active.
+- Fixed ability to set the reactor's turbine output or fission rate outside the allowed range of 0-100 using the "set_fissionrate" and "set_turbineoutput" inputs.
+- Fixed crashing when opening the weapon customization menu when there's non-swappable turrets in the sub.
+- Fixed misaligned light sprites on nav terminal and status monitor.
Modding:
-- Fixed overriding nav terminals with a mod resetting the changes to the custom interface buttons.
-- Fixed status effect conditionals that check a parent container's tags checking the container's components, not just the item itself. Resulted in tag inequality checks always succeeding, because the components don't have any tags.
-- Fixed crashing if a scripted event tries to spawn a human prefab that can't be found (i.e. if a mod uses a non-existent human prefab identifier).
-- RemoveItemAction can be used to remove tagged items directly, not just items in a tagged character's inventory.
-- Replaced "spawnprobability" attribute in monster events with a generic "probability" attribute that can be used for any type of event.
-- Option to spawn particles across the ray cast from a hitscan projectile (see "pulselaserbolt").
-- Fixed linked subs included in outpost modules being positioned incorrectly.
-- Added "swapidentifier" to SwappableItem definitions. Can be used to restrict which items in a given category can be swapped with each other (e.g. if you want to add custom upgradeable turrets but not make them swappable with the vanilla turrets).
-- Made SecondaryUse status effects work with ranged weapons.
-- Added "equal" targeting tag to enemy AI. Makes it possible to define how monsters react to monsters with the same combat strength.
-- TagAction can be used to tag characters based on the human prefab identifier.
-- Fixed a crash in the character editor that happened when a humanoid character had an elbow joint but didn't (yet) have a wrist joint.
-- The "avoid gun fire" parameter now defaults to false.
-- Added "equal" targeting tag for monster AI definitions.
+- Fixed crashing when trying to create a thalamus when there's no wreck AI configs available in the selected content packages.
---------------------------------------------------------------------------------------------------------
-v0.1400.1.0 (unstable)
----------------------------------------------------------------------------------------------------------
-
-Changes:
-- Improvements/balancing to the pulse laser and chaingun.
-- Option to choose multiple missions per level.
-- Added some hardpoints to the vanilla subs.
-- Replaced the old railgun loaders with the new smaller versions.
-- Improvements to the weapon customization menu.
-- Docking ports can't be rewired in outpost levels because it can be abused to force to submarine to depart from the outpost.
-- The ice shards and exploding mushrooms in caves can be destroyed with weapons and explosives.
-- The pirate missions can no longer be completed by exploding the reactor: all the pirates need to be killed for the mission to be successful.
-- Changed the way diving suits are picked up: now LMB equips the suit like it did before, and the suits can be picked up with E.
-- Taking items that contain stolen items counts as stealing, so you can't for example put a toolbox inside an outpost cabinet, load it full of items and then take it.
-- Added a button for resetting in-game hints to the settings.
-- Mention diving suits' depth limits in their descriptions.
-- Modified the locked path tooltips to mention the officer in the outpost.
-- Reset reactor fission rate, turbine output and temperature to optimal levels at the start of a round. Prevents the reactor from catching fire at the start of a round if it was being operated at a high fission rate at the end of the previous round.
-- Increased canister shell pellet count from 7 to 10, increased pellet damage from 22 to 25, reduced spread from 25 to 20.
-- Option to disable swapping specific weapons in the sub editor.
-- Items that are set to be hidden in-game can't be swapped.
-- Removed ability to drag and drop seeds into planters.
-- Added ability to load .sub, .xml, .png and .jpeg files in sub editor by dragging and dropping them onto the game window.
-- Added new biome-specific background noise tracks.
-- Made upgrades affect all submarines. Old purchased submarines will have their upgrades overridden by the currently loaded submarine's upgrades.
-- Improved the command interface minimap view by adding connector lines between icons and item positions to better visualize which item each icon is linked to.
-- Projectiles go through severed limbs.
-
-Fixes:
-- Fixed rotation of mirrored items getting messed up when saving and reloading a sub.
-- Fixed inability to detach items attached outside the sub.
-- Removed colliders from decorative pirate submarine pieces.
-- Fixed pirate bandana sprite.
-- Fixed depth decoy sprite.
-- Fixed items that are inside a hull being difficult to target from outside the sub (docking ports/hatches in particular).
-- Fixed crashing when trying to load a campaign save that contains pets that can't be found (e.g. if you've saved while using a mod that adds custom pets and try to load the save in the vanilla game).
-- Fixed crashing when trying to change a location's type to a type that can't be found (e.g. if a mod includes custom location types which are configured incorrectly).
-- Fixed "are you sure you want to depart without a mission" prompt popping up even if there's no missions available.
-- Fixed pirate missions not ending automatically when docking with the destination outpost in mission mode.
-- Fixed client-side "index out of range" errors when a pirate gets assigned the "navigatetactical" order.
-- Fixed health bars showing up through walls.
-- Fixed main sub's docking ports not showing up on the respawn shuttle's sonar.
-- Fixed abandoned outposts' docking ports not showing up on sonar.
-- Fixed handheld sonar showing the enemy sub in PvP mode when used outside the main sub.
-- Fixed how weapons are displayed on the outpost display shelves.
-- Fixed location portrait overlapping with the texts in the tab menu's mission tab.
-- Fixed horizontal docking ports sometimes docking from the wrong side in mirrored subs.
-- Fixed mouse wheel zooming the nav terminal view when the server log (or any other UI element) is blocking it.
-- Fixed chainguns not damaging items (e.g. eggs, piezo crystals).
-- Fixed Watcher always spawning at the start when the difficulty is between 10 and 20.
-- Fixed wrecks never spawning in certain biomes, even if there's a wreck mission selected.
-- Fixed legacy railgun loaders exploding the shells.
-- Fixed campaign's initial text popup getting stuck if the sub automatically undocks at the start of a round.
-- Swapped weapons inherit the scale, rotation, sprite depth and sprite color from the previously installed item.
-- Non-empty items (ammo boxes, fuel rods, etc) can't be recycled.
-- Fixed afflictions applying their status effects multiple times, causing afflictions that apply other afflictions way faster than they should (e.g. opiate withdrawal caused by opiate addiction, burns caused by radiation sickness).
-- Fixed all sonar markers of a given mission displaying the same distance reading.
-- Fixed command interface minimap tooltips not being displayed.
-- Fixed bot orders not being saved in multiplayer.
-- Disabled the tab menu missions tab in the test game modes (e.g. sub editor) to fix a related crash.
-- Made airlock door assembly behave a bit more reliably. The circuit in the assembly simply toggles the state of both doors, meaning that one of the doors needs to always be closed and the other open for the logic to work correctly. If using the assembly in a respawn shuttle, it'd break when the shuttle leaves and it's doors are forced to close.
-- Fixed inability to go through docking ports when the door/hatch at the other side is broken.
-- Fixed other entities' sprites disappearing when reloading a sprite in the sub editor.
-- Fixed Remora drone's docking hatch being repairable with a welding tool instead of a wrench.
-- Fixed some of Remora drone's walls being transparent.
-
-Modding:
-- Made it possible to use StatusHUD components in non-equippable items like turrets.
-- Fixed scripted event's StatusEffectAction not being able to target ItemComponents.
-- Added support for making triggering scripted events.
-- Option to configure the color of an explosion's flash.
-- Option to configure the number of gates between biomes (see MapGenerationParameters.xml).
-- Fixed "publishing [mod] in the steam workshop failed" error when trying to publish a mod that contains enemy subs.
-
----------------------------------------------------------------------------------------------------------
-v0.1400.0.0 (unstable)
+v0.14.4.0
---------------------------------------------------------------------------------------------------------
Changes:
- Submarine weapons can be swapped in the outposts.
-- Added Pulse Laser and Chaingun (still WIP).
+- Added Pulse Laser and Chaingun.
- Added Canister Shells (a reloadable burst-type munition for the railgun).
- Added escort missions.
- Added pirate missions.
+- Option to choose multiple missions per level.
+- Made it possible to sell items on the sub through a new store tab in singleplayer.
- Cargo now spawns in crate shelves and "Unit Load Devices" (large containers mostly used in cargo subs). The amount of cargo you can transport depends on the number of the shelves/ULDs, and the cargo mission rewards scale according to the cargo capacity. If there's no shelves or ULDs, you can still transport a small number of crates on the cargo room's floor like before.
+- Made upgrades affect all submarines. Old purchased submarines will have their upgrades overridden by the currently loaded submarine's upgrades.
- The previous music track continues playing when the game switches back from the "intensity tracks" to normal music.
- Made it possible to carry diving suits and toolbelts in hands. We could use some feedback on the way this works: is it intuitive, should there be a separate key for picking them up...?
+- The ice shards and exploding mushrooms in caves can be destroyed with weapons and explosives.
- Added tracer particles to raycast projectiles (hitscan).
- Increased sonar beacon range.
- Color character names according to the team when using the Health Scanner HUD.
@@ -237,7 +52,24 @@ Changes:
- Updated sounds for Endworm and the electrical discharger.
- Increased the stun of smg rounds from 0.125 to 0.15 to give it a bit more stopping power.
- Lowered Husks' health regeneration and bleeding reduction. Crawler Husks now regenerate too. Lowered their health a bit to compensate it.
+- Hammerhead and Golden Hammerhead: Increased health, added some protection on claws and the tail end. Slightly increase the slow swimming speed and animations. The claws don't break anymore when shot with coilgun.
+- Hammerheads and Husks don't avoid gun fire anymore. Pets now avoid gun fire.
+- Removed Endworm's weak point in the mouth.
- Most outpost events no longer trigger automatically, but require interacting with a specific item/character.
+- Taking items that contain stolen items counts as stealing, so you can't for example put a toolbox inside an outpost cabinet, load it full of items and then take it.
+- Added a button for resetting in-game hints to the settings.
+- Mention diving suits' depth limits in their descriptions.
+- Modified the locked path tooltips to mention the officer in the outpost.
+- Reset reactor fission rate, turbine output and temperature to optimal levels at the start of a round. Prevents the reactor from catching fire at the start of a round if it was being operated at a high fission rate at the end of the previous round.
+- Removed ability to drag and drop seeds into planters.
+- Added ability to load .sub, .xml, .png and .jpeg files in sub editor by dragging and dropping them onto the game window.
+- Added new biome-specific background noise tracks.
+- Improved the command interface minimap view by adding connector lines between icons and item positions to better visualize which item each icon is linked to.
+- Projectiles go through severed limbs.
+- Docking ports can't be rewired in outpost levels because it can be abused to force to submarine to depart from the outpost.
+- Allow clicking on the main menu buttons when the credits are open.
+- Option to adjust motion sensor's update interval in the sub editor.
+
Fixes:
- Fixed clients timing out at the start of a multiplayer round if loading the campaign save takes more than 30 seconds.
@@ -256,12 +88,86 @@ Fixes:
- Fixed security officers often handcuffing you after one hit with stun baton (#5649).
- Fixed ignore orders not being properly synced when joining a multiplayer game mid-round.
- Fixed abyss monsters not spawning if there's any player sub (including the respawn shuttle) above the abyss.
+- Fixed "are you sure you want to depart without a mission" prompt popping up even if there's no missions available.
+- Fixed health bars showing up through walls.
+- Fixed horizontal docking ports sometimes docking from the wrong side in mirrored subs.
+- Fixed mouse wheel zooming the nav terminal view when the server log (or any other UI element) is blocking it.
+- Fixed campaign's initial text popup getting stuck if the sub automatically undocks at the start of a round.
+- Non-empty items (ammo boxes, fuel rods, etc) can't be recycled.
+- Made airlock door assembly behave a bit more reliably. The circuit in the assembly simply toggles the state of both doors, meaning that one of the doors needs to always be closed and the other open for the logic to work correctly. If using the assembly in a respawn shuttle, it'd break when the shuttle leaves and it's doors are forced to close.
+- Fixed inability to go through docking ports when the door/hatch at the other side is broken.
+- Fixed other entities' sprites disappearing when reloading a sprite in the sub editor.
+- Fixed Remora drone's docking hatch being repairable with a welding tool instead of a wrench.
+- Fixed some of Remora drone's walls being transparent.
+- Fixed rotation of mirrored items getting messed up when saving and reloading a sub.
+- Fixed inability to detach items attached outside the sub.
+- Fixed items that are inside a hull being difficult to target from outside the sub (docking ports/hatches in particular).
+- Fixed crashing when trying to load a campaign save that contains pets that can't be found (e.g. if you've saved while using a mod that adds custom pets and try to load the save in the vanilla game).
+- Fixed crashing when trying to change a location's type to a type that can't be found (e.g. if a mod includes custom location types which are configured incorrectly).
+- Fixed "Ignore This" order affecting all NPCs. It should only affect the bots in a player team.
+- Fixed "Ignore This" order restricting player access to doors.
+- Fixed bots targeting same targets when fixing/repairing.
+- Fixed monsters sometimes getting stuck "dancing" near the submarine because they try to avoid and target it at the same time.
+- Monster events: Fixed many higher difficulty subsets spawning multiple monster events when they should spawn only one.
+- Fixed items taken from abandoned outposts sometimes reappearing when returning to the outpost.
+- Fixed highlighting items sometimes breaking after dropping a metal crate or some other container whose inventory is always visible when the item is equipped.
+- Fixed bots putting minerals in the closest locker instead of preferring those that have been tagged with the "mineralcontainer" tag
+- Fixed bots not respecting the access restrictions when choosing a where to put items into.
+- Fixed bots being able to take items from secure cabinets if the item is inside another container inside the cabinet.
+- Fixes to hull generation between docking ports. Should fix tiny gaps between the hulls that caused characters to briefly teleport outside the sub when passing through the port, and hulls generating incorrectly when the main submarine has hulls at both sides of the docking port.
+- Fixed captain's pipe, harmonica and pipe tobacco not spawning in crates when purchased.
+- Fixed console errors when trying to overwrite an existing item assembly in the sub editor.
+- Fixed the margin calculations that in some cases made it impossible for Bonethreshers (and possibly other monsters) to reach a moving target.
+- Fixed abyss monsters sometimes being unable to hit the sub and just keep pushing the sub.
+- Define "tool", "weapon", and "provocative" targeting params to be ignored if the creature is not in the same sub as the target. Fixes some odd cases where the monsters e.g. target some item inside the sub when they are outside.
+- Fixed occasional excessive camera shake when a large monster is lodged between the sub and the level.
+- Fixed ballast flora not getting cleared from respawn shuttles when the shuttle despawns.
+- Fixed ability to switch back to a sub you've left behind using the outpost terminals.
+- Fixed doors without integrated buttons getting instantly opened by clicking on them when you have access to the button.
+- Fixed ability to switch control to the hostages with Z and X keys during hostage missions.
+- Fixed abyss and combat suits not getting autofilled with oxygen tanks when placing the initial supplies to a sub.
+- Fixed inability to type in the "max players" field in the "host server" tab.
+- Fixed item sell quantity sometimes appearing "maxed out" at a quantity less than what the player is actually selling.
+- Fixed crashing when the team id argument for the "spawn" console command is formatted incorrectly, mention the argument in the command's help text.
+- Fixed bots trying to clean up seeds and put items into bags that were moved to somewhere the bot can't access them, causing the bot to be stuck trying to reach the target.
+- Fixed missions sometimes unlocking in paths leading to an irradiated location even if there's a more suitable path available.
+- Fixed white rectangle around selected items in the sub editor being slightly off if the item's position/size is not a whole number.
+- Fixed "incorrect password" text overlapping with the buttons in the password prompt.
+- Fixed z-fighting in Medium Weapons Display Case.
+- Fixed inability to drop through broken hatches.
+- Fixed sprite bleed in IC-4 block's inventory icon.
+- Fixed healthbar and affliction area being clickable even if there's an UI element in front of them, and even if there's no afflictions in the affliction area. Most noticeable when editing an electrical components properties.
+- Fixed some incorrect room names in the beacon stations.
+- Fixed propeller damage area triggering very inaccurately, particularly on shuttle engines.
+- Fixed hull indicators fading in when loading a sub in the editor (they should only get hidden and fade in when editing the ambient light value).
+- Fixed gaps sometimes getting linked incorrectly to the hulls between docking hatches, preventing water from flowing down from the lower hull in mirrored subs. Happened in mirrored Kastrull for example.
+- Fixed fires in hulls between docking ports never going out client-side.
+- Fixed nav terminal's, sonar monitor's and status monitor's selection rectangles being offset from the sprite in the sub editor.
+- Fixed mirrored pumps emitting particles from the wrong side of the pump.
Modding:
+- Made it possible to use StatusHUD components in non-equippable items like turrets.
+- Fixed scripted event's StatusEffectAction not being able to target ItemComponents.
+- Added support for making missions trigger scripted events.
+- Option to configure the color of an explosion's flash.
+- Option to configure the number of gates between biomes (see MapGenerationParameters.xml).
- Turret's barrel and rail sprites are shown in the sprite editor.
- Made SecondaryUse status effects work with melee and ranged weapons.
- Renamed "Inflitrate" to "CanOpenDoors" and rewrote the tooltip.
- Added "scalemultiplier" (Vector2) for particle emitters so that the effects can be scaled just in one axis instead of both.
+- Fixed overriding nav terminals with a mod resetting the changes to the custom interface buttons.
+- Fixed status effect conditionals that check a parent container's tags checking the container's components, not just the item itself. Resulted in tag inequality checks always succeeding, because the components don't have any tags.
+- Fixed crashing if a scripted event tries to spawn a human prefab that can't be found (i.e. if a mod uses a non-existent human prefab identifier).
+- RemoveItemAction can be used to remove tagged items directly, not just items in a tagged character's inventory.
+- Replaced "spawnprobability" attribute in monster events with a generic "probability" attribute that can be used for any type of event.
+- Option to spawn particles across the ray cast from a hitscan projectile (see "pulselaserbolt").
+- Fixed linked subs included in outpost modules being positioned incorrectly.
+- Added "swapidentifier" to SwappableItem definitions. Can be used to restrict which items in a given category can be swapped with each other (e.g. if you want to add custom upgradeable turrets but not make them swappable with the vanilla turrets).
+- Made SecondaryUse status effects work with ranged weapons.
+- Added "equal" targeting tag to enemy AI. Makes it possible to define how monsters react to monsters with the same combat strength.
+- TagAction can be used to tag characters based on the human prefab identifier.
+- Fixed a crash in the character editor that happened when a humanoid character had an elbow joint but didn't (yet) have a wrist joint.
+- The "avoid gun fire" parameter now defaults to false.
---------------------------------------------------------------------------------------------------------
v0.13.3.11