Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
EvilFactory
2024-06-19 12:45:44 -03:00
12 changed files with 39 additions and 21 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ body:
label: Version label: Version
description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu. description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu.
options: options:
- v1.5.7.0 (Summer Update) - v1.5.8.0 (Summer Update)
- Other - Other
validations: validations:
required: true required: true
@@ -458,15 +458,16 @@ namespace Barotrauma
if (!back) { return; } if (!back) { return; }
if (holdable.Picker.Inventory?.GetItemInLimbSlot(InvSlotType.RightHand) == this) if (holdable.Picker.Inventory?.GetItemInLimbSlot(InvSlotType.RightHand) == this)
{ {
depth = GetHeldItemDepth(LimbType.RightHand, depth); depth = GetHeldItemDepth(LimbType.RightHand, holdable, depth);
} }
else if (holdable.Picker.Inventory?.GetItemInLimbSlot(InvSlotType.LeftHand) == this) else if (holdable.Picker.Inventory?.GetItemInLimbSlot(InvSlotType.LeftHand) == this)
{ {
depth = GetHeldItemDepth(LimbType.LeftHand, depth); depth = GetHeldItemDepth(LimbType.LeftHand, holdable, depth);
} }
float GetHeldItemDepth(LimbType limb, float depth) static float GetHeldItemDepth(LimbType limb, Holdable holdable, float depth)
{ {
if (holdable?.Picker?.AnimController == null) { return depth; }
//offset used to make sure the item draws just slightly behind the right hand, or slightly in front of the left hand //offset used to make sure the item draws just slightly behind the right hand, or slightly in front of the left hand
float limbDepthOffset = 0.000001f; float limbDepthOffset = 0.000001f;
float depthOffset = holdable.Picker.AnimController.GetDepthOffset(); float depthOffset = holdable.Picker.AnimController.GetDepthOffset();
@@ -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.5.7.0</Version> <Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</Copyright> <Copyright>Copyright © FakeFish 2018-2024</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.5.7.0</Version> <Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</Copyright> <Copyright>Copyright © FakeFish 2018-2024</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.5.7.0</Version> <Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</Copyright> <Copyright>Copyright © FakeFish 2018-2024</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.5.7.0</Version> <Version>1.5.8.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.5.7.0</Version> <Version>1.5.8.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.5.7.0</Version> <Version>1.5.8.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>
@@ -4850,8 +4850,6 @@ namespace Barotrauma
} }
#endif #endif
ApplyStatusEffects(ActionType.OnDeath, 1.0f);
AnimController.Frozen = false; AnimController.Frozen = false;
Character killer = causeOfDeathAffliction?.Source; Character killer = causeOfDeathAffliction?.Source;
@@ -4885,7 +4883,10 @@ namespace Barotrauma
info.LastResistanceMultiplierSkillLossRespawn = GetAbilityResistance(Tags.SkillLossRespawnResistance); info.LastResistanceMultiplierSkillLossRespawn = GetAbilityResistance(Tags.SkillLossRespawnResistance);
} }
//it's important that we set isDead before executing the status effects,
//otherwise a statuseffect might kill the character "again" and trigger a loop that crashes the game
isDead = true; isDead = true;
ApplyStatusEffects(ActionType.OnDeath, 1.0f);
#if CLIENT #if CLIENT
// Keep permadeath status in sync (to show it correctly in the UI, the server takes care of the actual logic) // Keep permadeath status in sync (to show it correctly in the UI, the server takes care of the actual logic)
@@ -298,7 +298,7 @@ namespace Barotrauma
public void PurchaseItems(Identifier storeIdentifier, List<PurchasedItem> itemsToPurchase, bool removeFromCrate, Client client = null) public void PurchaseItems(Identifier storeIdentifier, List<PurchasedItem> itemsToPurchase, bool removeFromCrate, Client client = null)
{ {
var store = Location.GetStore(storeIdentifier); var store = Location?.GetStore(storeIdentifier);
if (store == null) { return; } if (store == null) { return; }
var itemsPurchasedFromStore = GetPurchasedItems(storeIdentifier, create: true); var itemsPurchasedFromStore = GetPurchasedItems(storeIdentifier, create: true);
// Check all the prices before starting the transaction to make sure the modifiers stay the same for the whole transaction // Check all the prices before starting the transaction to make sure the modifiers stay the same for the whole transaction
@@ -269,10 +269,14 @@ namespace Barotrauma.Items.Components
public Color HudTint { get; set; } public Color HudTint { get; set; }
[Header(localizedTextTag: "sp.turret.AutoOperate.propertyheader")] [Header(localizedTextTag: "sp.turret.AutoOperate.propertyheader")]
[Serialize(false, IsPropertySaveable.Yes, description:"Should the turret operate automatically using AI targeting? Comes with some optional random movement that can be adjusted below."), [Serialize(false, IsPropertySaveable.Yes, description: "Should the turret operate automatically using AI targeting? Comes with some optional random movement that can be adjusted below."),
Editable(TransferToSwappedItem = true)] Editable(TransferToSwappedItem = true)]
public bool AutoOperate { get; set; } public bool AutoOperate { get; set; }
[Serialize(false, IsPropertySaveable.Yes, description: "Can the Auto Operate functionality be enabled using signals to the turret?"),
Editable(TransferToSwappedItem = true)]
public bool AllowAutoOperateWithWiring { get; set; }
[Serialize(0f, IsPropertySaveable.Yes, description: "[Auto Operate] How much the turret should adjust the aim off the target randomly instead of tracking the target perfectly? In Degrees."), [Serialize(0f, IsPropertySaveable.Yes, description: "[Auto Operate] How much the turret should adjust the aim off the target randomly instead of tracking the target perfectly? In Degrees."),
Editable(TransferToSwappedItem = true)] Editable(TransferToSwappedItem = true)]
public float RandomAimAmount { get; set; } public float RandomAimAmount { get; set; }
@@ -319,8 +323,8 @@ namespace Barotrauma.Items.Components
#endregion #endregion
private const string SetAutoOperatePin = "set_auto_operate"; private const string SetAutoOperateConnection = "set_auto_operate";
private const string ToggleAutoOperatePin = "toggle_auto_operate"; private const string ToggleAutoOperateConnection = "toggle_auto_operate";
public Turret(Item item, ContentXElement element) public Turret(Item item, ContentXElement element)
: base(item, element) : base(item, element)
@@ -374,12 +378,14 @@ namespace Barotrauma.Items.Components
if (loadedBaseRotation.HasValue) { BaseRotation = loadedBaseRotation.Value; } if (loadedBaseRotation.HasValue) { BaseRotation = loadedBaseRotation.Value; }
targetRotation = Rotation; targetRotation = Rotation;
UpdateTransformedBarrelPos(); UpdateTransformedBarrelPos();
if (!AutoOperate) if (!AllowAutoOperateWithWiring &&
Screen.Selected is { IsEditor: false })
{ {
// If the turret is not set to auto operate, don't allow changing the state with wirings. // If the turret is not set to auto operate and the auto operate connections haven't been wired to anything,
// don't allow changing the state with wirings.
foreach (ConnectionPanel connectionPanel in Item.GetComponents<ConnectionPanel>()) foreach (ConnectionPanel connectionPanel in Item.GetComponents<ConnectionPanel>())
{ {
connectionPanel.Connections.RemoveAll(c => c.Name is ToggleAutoOperatePin or SetAutoOperatePin); connectionPanel.Connections.RemoveAll(c => c.Name is ToggleAutoOperateConnection or SetAutoOperateConnection && c.Wires.None());
} }
} }
} }
@@ -1952,10 +1958,12 @@ namespace Barotrauma.Items.Components
UpdateLightComponents(); UpdateLightComponents();
} }
break; break;
case SetAutoOperatePin: case SetAutoOperateConnection:
if (!AllowAutoOperateWithWiring) { return; }
AutoOperate = signal.value != "0"; AutoOperate = signal.value != "0";
break; break;
case ToggleAutoOperatePin: case ToggleAutoOperateConnection:
if (!AllowAutoOperateWithWiring) { return; }
if (signal.value != "0") if (signal.value != "0")
{ {
AutoOperate = !AutoOperate; AutoOperate = !AutoOperate;
@@ -1,4 +1,12 @@
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------
v1.5.8.0
-------------------------------------------------------------------------------------------------------------------------------------------------
- Fixed crashing when killing a defense bot or a leucocyte.
- Fixed directional flak ammo box still being carried with 2 hands.
- Fixed set_auto_operate and toggle_auto_operate disappearing at the start of the round if AutoOperate is not enabled. Now there's a setting called "Allow Auto Operate With Wiring" which can be enabled in the sub editor to enable the connections.
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.5.7.0 v1.5.7.0
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------