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

View File

@@ -73,7 +73,7 @@ body:
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.
options:
- v1.5.7.0 (Summer Update)
- v1.5.8.0 (Summer Update)
- Other
validations:
required: true

View File

@@ -458,15 +458,16 @@ namespace Barotrauma
if (!back) { return; }
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)
{
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
float limbDepthOffset = 0.000001f;
float depthOffset = holdable.Picker.AnimController.GetDepthOffset();

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.5.7.0</Version>
<Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</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.5.7.0</Version>
<Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</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.5.7.0</Version>
<Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2024</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.5.7.0</Version>
<Version>1.5.8.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.5.7.0</Version>
<Version>1.5.8.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.5.7.0</Version>
<Version>1.5.8.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -4850,8 +4850,6 @@ namespace Barotrauma
}
#endif
ApplyStatusEffects(ActionType.OnDeath, 1.0f);
AnimController.Frozen = false;
Character killer = causeOfDeathAffliction?.Source;
@@ -4885,7 +4883,10 @@ namespace Barotrauma
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;
ApplyStatusEffects(ActionType.OnDeath, 1.0f);
#if CLIENT
// Keep permadeath status in sync (to show it correctly in the UI, the server takes care of the actual logic)

View File

@@ -298,7 +298,7 @@ namespace Barotrauma
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; }
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

View File

@@ -269,10 +269,14 @@ namespace Barotrauma.Items.Components
public Color HudTint { get; set; }
[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)]
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."),
Editable(TransferToSwappedItem = true)]
public float RandomAimAmount { get; set; }
@@ -319,8 +323,8 @@ namespace Barotrauma.Items.Components
#endregion
private const string SetAutoOperatePin = "set_auto_operate";
private const string ToggleAutoOperatePin = "toggle_auto_operate";
private const string SetAutoOperateConnection = "set_auto_operate";
private const string ToggleAutoOperateConnection = "toggle_auto_operate";
public Turret(Item item, ContentXElement element)
: base(item, element)
@@ -374,12 +378,14 @@ namespace Barotrauma.Items.Components
if (loadedBaseRotation.HasValue) { BaseRotation = loadedBaseRotation.Value; }
targetRotation = Rotation;
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>())
{
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();
}
break;
case SetAutoOperatePin:
case SetAutoOperateConnection:
if (!AllowAutoOperateWithWiring) { return; }
AutoOperate = signal.value != "0";
break;
case ToggleAutoOperatePin:
case ToggleAutoOperateConnection:
if (!AllowAutoOperateWithWiring) { return; }
if (signal.value != "0")
{
AutoOperate = !AutoOperate;

View File

@@ -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
-------------------------------------------------------------------------------------------------------------------------------------------------