diff --git a/Barotrauma/BarotraumaClient/ClientSource/Characters/Character.cs b/Barotrauma/BarotraumaClient/ClientSource/Characters/Character.cs index 8eca0c227..0135133fe 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Characters/Character.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Characters/Character.cs @@ -205,9 +205,14 @@ namespace Barotrauma { foreach (Key key in keys) { - if (key == null) continue; + if (key == null) { continue; } key.Reset(); } + if (GUI.InputBlockingMenuOpen) + { + cursorPosition = + Position + PlayerInput.MouseSpeed.ClampLength(10.0f); //apply a little bit of movement to the cursor pos to prevent AFK kicking + } } else { @@ -280,13 +285,13 @@ namespace Barotrauma { cam.OffsetAmount = targetOffsetAmount = item.Prefab.OffsetOnSelected * item.OffsetOnSelectedMultiplier; } - else if (SelectedConstruction != null && ViewTarget == null && + else if (SelectedConstruction != null && ViewTarget == null && SelectedConstruction.Components.Any(ic => ic?.GuiFrame != null && ic.ShouldDrawHUD(this))) { cam.OffsetAmount = targetOffsetAmount = 0.0f; - cursorPosition = - SelectedConstruction.Position + - new Vector2(cursorPosition.X % 10.0f, cursorPosition.Y % 10.0f); //apply a little bit of movement to the cursor pos to prevent AFK kicking + cursorPosition = + SelectedConstruction.Position + + PlayerInput.MouseSpeed.ClampLength(10.0f); //apply a little bit of movement to the cursor pos to prevent AFK kicking } else if (!GameMain.Config.EnableMouseLook) { diff --git a/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs b/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs index 349ef98eb..4cbace2fb 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs @@ -439,7 +439,8 @@ namespace Barotrauma bool mouseOnPortrait = false; if (character.Stun <= 0.1f && !character.IsDead) { - if (CharacterHealth.OpenHealthWindow == null && character.SelectedCharacter == null) + bool wiringMode = Screen.Selected == GameMain.SubEditorScreen && GameMain.SubEditorScreen.WiringMode; + if (CharacterHealth.OpenHealthWindow == null && character.SelectedCharacter == null && !wiringMode) { if (character.Info != null && !character.ShouldLockHud()) { diff --git a/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs b/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs index 7ee5b8499..9ff6e562a 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs @@ -1914,13 +1914,17 @@ namespace Barotrauma i++; } - if (selectedLimbIndex > -1) + if (selectedLimbIndex > -1 && selectedLimbText != null) { - var selectedLimbArea = GetLimbHighlightArea(limbHealths[selectedLimbIndex], drawArea); - GUI.DrawLine(spriteBatch, - new Vector2(selectedLimbText.Rect.X, selectedLimbText.Rect.Center.Y), - selectedLimbArea.Center.ToVector2(), - Color.LightGray * 0.5f, width: 4); + LimbHealth limbHealth = limbHealths[selectedLimbIndex]; + if (limbHealth?.IndicatorSprite != null) + { + Rectangle selectedLimbArea = GetLimbHighlightArea(limbHealth, drawArea); + GUI.DrawLine(spriteBatch, + new Vector2(selectedLimbText.Rect.X, selectedLimbText.Rect.Center.Y), + selectedLimbArea.Center.ToVector2(), + Color.LightGray * 0.5f, width: 4); + } } if (draggingMed != null) diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs index 40ee18f21..57e963b91 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs @@ -1005,12 +1005,6 @@ namespace Barotrauma // Sub editor drag and highlight case SubEditorScreen editor: { - // Portrait area - if (editor.WiringMode && HUDLayoutSettings.BottomRightInfoArea.Contains(PlayerInput.MousePosition)) - { - return CursorState.Hand; - } - foreach (var mapEntity in MapEntity.mapEntityList) { if (MapEntity.StartMovingPos != Vector2.Zero) diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs index fd0d3f782..083551ad0 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/UpgradeStore.cs @@ -849,8 +849,19 @@ namespace Barotrauma string quantityText = ""; if (linkedItems.Count > 1) { - quantityText = " " + TextManager.GetWithVariable("campaignstore.quantity", "[amount]", (linkedItems.Count).ToString()); - name += quantityText; + foreach (ItemPrefab distinctItem in linkedItems.Select(it => it.Prefab).Distinct()) + { + if (quantityText != string.Empty) + { + quantityText += ", "; + } + int count = linkedItems.Count(it => it.Prefab == distinctItem); + quantityText += distinctItem.Name; + if (count > 1) + { + quantityText += " " + TextManager.GetWithVariable("campaignstore.quantity", "[amount]", count.ToString()); + } + } } bool isOpen = false; @@ -873,7 +884,7 @@ namespace Barotrauma new GUITextBlock(rectT(0.3f, 1f, buttonLayout), text: slotText, font: GUI.SubHeadingFont); GUILayoutGroup group = new GUILayoutGroup(rectT(0.7f, 1f, buttonLayout), isHorizontal: true) { Stretch = true }; - string title = item.PendingItemSwap != null ? TextManager.GetWithVariable("upgrades.pendingitem", "[itemname]", name) : (linkedItems.Count > 1 ? item.Name + quantityText : item.Name); + string title = item.PendingItemSwap != null ? TextManager.GetWithVariable("upgrades.pendingitem", "[itemname]", name) : quantityText; GUITextBlock text = new GUITextBlock(rectT(0.7f, 1f, group), text: title, font: GUI.SubHeadingFont, textAlignment: Alignment.Right, parseRichText: true) { TextColor = GUI.Style.Orange @@ -896,7 +907,7 @@ namespace Barotrauma if (isUninstallPending) { canUninstall = false; } frames.Add(CreateUpgradeEntry(rectT(1f, 0.25f, parent.Content), currentOrPending.UpgradePreviewSprite, - TextManager.GetWithVariable(item.PendingItemSwap != null ? "upgrades.pendingitem" : "upgrades.installeditem", "[itemname]", name), + item.PendingItemSwap != null ? TextManager.GetWithVariable("upgrades.pendingitem", "[itemname]", name) : TextManager.GetWithVariable("upgrades.installeditem", "[itemname]", quantityText), currentOrPending.Description, 0, null, addBuyButton: canUninstall, addProgressBar: false, buttonStyle: "WeaponUninstallButton")); diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs index 63235d0d5..516f62488 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Items/CharacterInventory.cs @@ -133,7 +133,6 @@ namespace Barotrauma hidePersonalSlots = !hidePersonalSlots; return true; }; - hidePersonalSlots = false; SlotPositions = new Vector2[SlotTypes.Length]; @@ -258,6 +257,15 @@ namespace Barotrauma if (IsInLimbSlot(item, InvSlotType.Any)) { return true; } } + //don't draw equipment slots in wiring mode + if (Screen.Selected == GameMain.SubEditorScreen && GameMain.SubEditorScreen.WiringMode) + { + if (SlotTypes[i] != InvSlotType.Any && SlotTypes[i] != InvSlotType.LeftHand && SlotTypes[i] != InvSlotType.RightHand) + { + return true; + } + } + return false; } @@ -339,7 +347,7 @@ namespace Barotrauma hideButton.RectTransform.SetPosition(Anchor.TopLeft, Pivot.TopLeft); hideButton.RectTransform.NonScaledSize = new Point(HideButtonWidth, HUDLayoutSettings.BottomRightInfoArea.Height); hideButton.RectTransform.AbsoluteOffset = new Point(HUDLayoutSettings.BottomRightInfoArea.Left - HideButtonWidth + GUI.IntScaleCeiling(2f), HUDLayoutSettings.BottomRightInfoArea.Y + GUI.IntScaleCeiling(1f)); - hideButton.Visible = true; + hideButton.Visible = Screen.Selected != GameMain.SubEditorScreen || !GameMain.SubEditorScreen.WiringMode; SetIndicatorSizes(); } diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/Fabricator.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/Fabricator.cs index a2fc0362e..e63a0fb84 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/Fabricator.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/Fabricator.cs @@ -562,7 +562,7 @@ namespace Barotrauma.Items.Components { if (selectedItem == null) { return false; } if (fabricatedItem == null && - !outputContainer.Inventory.CanBePut(selectedItem.TargetItem, selectedItem.OutCondition)) + !outputContainer.Inventory.CanBePut(selectedItem.TargetItem, selectedItem.OutCondition * selectedItem.TargetItem.Health)) { outputSlot.Flash(GUI.Style.Red); return false; diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/Inventory.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/Inventory.cs index 4fdc6a637..e563f152d 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Items/Inventory.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Items/Inventory.cs @@ -1104,8 +1104,10 @@ namespace Barotrauma public static void UpdateDragging() { - DraggingItems.RemoveAll(it => !Character.Controlled.CanInteractWith(it)); - + if (Screen.Selected == GameMain.GameScreen) + { + DraggingItems.RemoveAll(it => !Character.Controlled.CanInteractWith(it)); + } if (DraggingItems.Any() && PlayerInput.PrimaryMouseButtonReleased()) { Character.Controlled.ClearInputs(); @@ -1470,7 +1472,7 @@ namespace Barotrauma if (DraggingItems.Any() && inventory != null && slotIndex > -1 && slotIndex < inventory.visualSlots.Length) { - if (inventory.CanBePut(DraggingItems.First(), slotIndex)) + if (inventory.CanBePutInSlot(DraggingItems.First(), slotIndex)) { canBePut = true; } diff --git a/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs b/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs index f14529247..5b4481583 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Screens/SubEditorScreen.cs @@ -4506,7 +4506,7 @@ namespace Barotrauma { var newItem = new Item(itemPrefab, Vector2.Zero, Submarine.MainSub); - if (inv.CanBePut(itemPrefab, i)) + if (inv.CanBePutInSlot(itemPrefab, i, condition: null)) { bool placedItem = inv.TryPutItem(newItem, i, false, true, dummyCharacter); spawnedItem |= placedItem; diff --git a/Barotrauma/BarotraumaClient/ClientSource/Sounds/SoundPlayer.cs b/Barotrauma/BarotraumaClient/ClientSource/Sounds/SoundPlayer.cs index 70b272002..de7051846 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Sounds/SoundPlayer.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Sounds/SoundPlayer.cs @@ -851,7 +851,7 @@ namespace Barotrauma } } - + int noiseLoopIndex = 1; if (Level.Loaded?.Type == LevelData.LevelType.LocationConnection) { // Find background noise loop for the current biome @@ -859,7 +859,6 @@ namespace Barotrauma GetSuitableMusicClips(Level.Loaded.LevelData?.Biome?.Identifier, currentIntensity) : Enumerable.Empty(); - int noiseLoopIndex = 1; if (suitableNoiseLoops.Count() == 0) { targetMusic[noiseLoopIndex] = null; @@ -870,6 +869,10 @@ namespace Barotrauma targetMusic[noiseLoopIndex] = suitableNoiseLoops.GetRandom(); } } + else + { + targetMusic[noiseLoopIndex] = null; + } //get the appropriate intensity layers for current situation IEnumerable suitableIntensityMusic = Screen.Selected == GameMain.GameScreen ? diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj index a87c1c495..7c10848a3 100644 --- a/Barotrauma/BarotraumaClient/LinuxClient.csproj +++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.1400.7.0 + 0.1400.8.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj index abc93b9cf..85713573d 100644 --- a/Barotrauma/BarotraumaClient/MacClient.csproj +++ b/Barotrauma/BarotraumaClient/MacClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.1400.7.0 + 0.1400.8.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj index a7c2129df..38d414390 100644 --- a/Barotrauma/BarotraumaClient/WindowsClient.csproj +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.1400.7.0 + 0.1400.8.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj index 9f804b322..1d407fe78 100644 --- a/Barotrauma/BarotraumaServer/LinuxServer.csproj +++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.1400.7.0 + 0.1400.8.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj index acd280e75..9448e89ee 100644 --- a/Barotrauma/BarotraumaServer/MacServer.csproj +++ b/Barotrauma/BarotraumaServer/MacServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.1400.7.0 + 0.1400.8.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/CharacterCampaignData.cs b/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/CharacterCampaignData.cs index 20f63ddd9..94152023e 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/CharacterCampaignData.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/CharacterCampaignData.cs @@ -37,6 +37,14 @@ namespace Barotrauma public void SpawnInventoryItems(Character character, Inventory inventory) { + if (character == null) + { + throw new System.InvalidOperationException($"Failed to spawn inventory items. Character was null."); + } + if (itemData == null) + { + throw new System.InvalidOperationException($"Failed to spawn inventory items for the character \"{character.Name}\". No saved inventory data."); + } character.SpawnInventoryItems(inventory, itemData); } diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs index 0285f1bc1..7f97a81d9 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs @@ -426,7 +426,14 @@ namespace Barotrauma.Networking } else { - characterData.SpawnInventoryItems(character, character.Inventory); + if (characterData.HasItemData) + { + characterData.SpawnInventoryItems(character, character.Inventory); + } + else + { + character.GiveJobItems(mainSubSpawnPoints[i]); + } characterData.ApplyHealthData(character); character.GiveIdCardTags(mainSubSpawnPoints[i]); characterData.HasSpawned = true; diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj index 39607f8d9..75e9d31a6 100644 --- a/Barotrauma/BarotraumaServer/WindowsServer.csproj +++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.1400.7.0 + 0.1400.8.0 Copyright © FakeFish 2018-2020 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/EnemyAIController.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/EnemyAIController.cs index 169bc5a75..ba65f0c2c 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/EnemyAIController.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/EnemyAIController.cs @@ -2527,9 +2527,8 @@ namespace Barotrauma // Don't target items that we own. // This is a rare case, and almost entirely related to Humanhusks, so let's check it last to reduce unnecessary checks (although the check shouldn't be expensive) if (owner == character) { continue; } - if (owner != null && IsFriendly(Character, owner)) + if (owner != null && (IsFriendly(Character, owner) || owner.AiTarget != null && ignoredTargets.Contains(owner.AiTarget))) { - // If the item is held by a friendly character, ignore it. continue; } } diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/HumanAIController.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/HumanAIController.cs index b01023b5b..8c562b697 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/HumanAIController.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/HumanAIController.cs @@ -480,19 +480,18 @@ namespace Barotrauma isCurrentObjectiveFindSafety || Character.AnimController.InWater || Character.AnimController.HeadInWater || - Character.CurrentHull == null || Character.Submarine == null || (Character.Submarine.TeamID != Character.TeamID && !Character.IsEscorted) || - ObjectiveManager.CurrentObjective.GetSubObjectivesRecursive(true).Any(o => o.KeepDivingGearOn); + ObjectiveManager.CurrentObjective.GetSubObjectivesRecursive(true).Any(o => o.KeepDivingGearOn) || + Character.CurrentHull.OxygenPercentage < HULL_LOW_OXYGEN_PERCENTAGE + 10; + bool IsOrderedToWait() => Character.IsOnPlayerTeam && ObjectiveManager.CurrentOrder is AIObjectiveGoTo goTo && goTo.Target == Character; + bool removeDivingSuit = !shouldKeepTheGearOn && !IsOrderedToWait(); if (oxygenLow && Character.CurrentHull.Oxygen > 0 && (!isCurrentObjectiveFindSafety || Character.OxygenAvailable < 1)) { shouldKeepTheGearOn = false; + // Remove the suit before we pass out + removeDivingSuit = true; } - else if (Character.CurrentHull.OxygenPercentage < HULL_LOW_OXYGEN_PERCENTAGE + 10) - { - shouldKeepTheGearOn = true; - } - bool removeDivingSuit = !shouldKeepTheGearOn && Character.Submarine?.TeamID == Character.TeamID && (!(ObjectiveManager.CurrentOrder is AIObjectiveGoTo goTo) || goTo.Target != Character); bool takeMaskOff = !shouldKeepTheGearOn; if (!shouldKeepTheGearOn && !oxygenLow) { diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGoTo.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGoTo.cs index 899cb9ba6..099c63df4 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGoTo.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGoTo.cs @@ -242,7 +242,7 @@ namespace Barotrauma Character followTarget = Target as Character; bool needsDivingSuit = targetIsOutside; bool needsDivingGear = needsDivingSuit || HumanAIController.NeedsDivingGear(targetHull, out needsDivingSuit); - if (!needsDivingGear && mimic) + if (mimic) { if (HumanAIController.HasDivingSuit(followTarget)) { diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs index 4bfa37601..c8596dbb2 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs @@ -312,7 +312,7 @@ namespace Barotrauma } } } - if (itemNameList.Count > 0) + if (itemNameList.Any()) { string itemListStr = ""; if (itemNameList.Count == 1) @@ -342,12 +342,17 @@ namespace Barotrauma } }); } + else if (cprSuitability <= 0) + { + character.Speak(TextManager.GetWithVariable("dialogcannottreatpatient", "[name]", targetCharacter.DisplayName, formatCapitals: false), identifier: "cannottreatpatient", minDurationBetweenSimilar: 20.0f); + Abandon = true; + } } } else if (!targetCharacter.IsUnconscious) { //no suitable treatments found, not inside our own sub (= can't search for more treatments), the target isn't unconscious (= can't give CPR) - // -> abandon + character.Speak(TextManager.GetWithVariable("dialogcannottreatpatient", "[name]", targetCharacter.DisplayName, formatCapitals: false), identifier: "cannottreatpatient", minDurationBetweenSimilar: 20.0f); Abandon = true; return; } diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs index 739f93133..62345dc03 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs @@ -2708,25 +2708,18 @@ namespace Barotrauma UpdateAIChatMessages(deltaTime); //Do ragdoll shenanigans before Stun because it's still technically a stun, innit? Less network updates for us! - bool allowRagdoll = GameMain.NetworkMember != null ? GameMain.NetworkMember.ServerSettings.AllowRagdollButton : true; - bool tooFastToUnragdoll = AnimController.Collider.LinearVelocity.LengthSquared() > 1f; - if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient) - { - tooFastToUnragdoll = false; - } + bool allowRagdoll = GameMain.NetworkMember?.ServerSettings?.AllowRagdollButton ?? true; + bool tooFastToUnragdoll = AnimController.Collider.LinearVelocity.LengthSquared() > 5.0f * 5.0f; if (IsForceRagdolled) { IsRagdolled = IsForceRagdolled; } - else if (IsRemotePlayer) - { - IsRagdolled = IsKeyDown(InputType.Ragdoll); - } //Keep us ragdolled if we were forced or we're too speedy to unragdoll else if (allowRagdoll && (!IsRagdolled || !tooFastToUnragdoll)) { if (ragdollingLockTimer > 0.0f) { + SetInput(InputType.Ragdoll, false, true); ragdollingLockTimer -= deltaTime; } else @@ -2908,7 +2901,7 @@ namespace Barotrauma } private float despawnTimer; - private void UpdateDespawn(float deltaTime, bool ignoreThresholds = false) + private void UpdateDespawn(float deltaTime, bool ignoreThresholds = false, bool createNetworkEvents = true) { if (!EnableDespawn) { return; } @@ -2979,10 +2972,10 @@ namespace Barotrauma if (itemContainer == null) { return; } foreach (Item inventoryItem in Inventory.AllItemsMod) { - if (!itemContainer.Inventory.TryPutItem(inventoryItem, user: null)) + if (!itemContainer.Inventory.TryPutItem(inventoryItem, user: null, createNetworkEvent: createNetworkEvents)) { //if the item couldn't be put inside the despawn container, just drop it - inventoryItem.Drop(dropper: this); + inventoryItem.Drop(dropper: this, createNetworkEvent: createNetworkEvents); } } } @@ -2994,7 +2987,7 @@ namespace Barotrauma public void DespawnNow(bool createNetworkEvents = true) { despawnTimer = GameMain.Config.CorpseDespawnDelay; - UpdateDespawn(1.0f, ignoreThresholds: true); + UpdateDespawn(1.0f, ignoreThresholds: true, createNetworkEvents: createNetworkEvents); Spawner.Update(createNetworkEvents); } @@ -3990,7 +3983,7 @@ namespace Barotrauma //now there's just one, try to put the extra items where they fit (= stack them) for (int i = 0; i < inventory.Capacity; i++) { - if (inventory.CanBePut(newItem, i)) + if (inventory.CanBePutInSlot(newItem, i)) { slotIndices[0] = i; canBePutInOriginalInventory = true; @@ -4000,7 +3993,7 @@ namespace Barotrauma } else { - canBePutInOriginalInventory = inventory.CanBePut(newItem, slotIndices[0], ignoreCondition: true); + canBePutInOriginalInventory = inventory.CanBePutInSlot(newItem, slotIndices[0], ignoreCondition: true); } if (canBePutInOriginalInventory) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/CargoMission.cs b/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/CargoMission.cs index ee662e36b..dcc9d3279 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/CargoMission.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/CargoMission.cs @@ -47,7 +47,7 @@ namespace Barotrauma requiredDeliveryAmount = Math.Min(prefab.ConfigElement.GetAttributeFloat("requireddeliveryamount", 0.98f), 1.0f); //this can get called between rounds when the client receives a campaign save //don't attempt to determine cargo if the sub hasn't been fully loaded - if (sub == null || sub.Loading || sub.Removed || Submarine.Unloading) + if (sub == null || sub.Loading || sub.Removed || Submarine.Unloading || !Submarine.Loaded.Contains(sub)) { return; } diff --git a/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/NestMission.cs b/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/NestMission.cs index cb7a4f83a..210d5557c 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/NestMission.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/NestMission.cs @@ -18,7 +18,7 @@ namespace Barotrauma //string = filename, point = min,max private readonly HashSet> monsterPrefabs = new HashSet>(); - private readonly float itemSpawnRadius = 800.0f; + private float itemSpawnRadius = 800.0f; private readonly float approachItemsRadius = 1000.0f; private readonly float nestObjectRadius = 1000.0f; private readonly float monsterSpawnRadius = 3000.0f; @@ -107,7 +107,8 @@ namespace Barotrauma //ruin/cave/wreck items are allowed to spawn close to the sub float minDistance = spawnPositionType == Level.PositionType.Ruin || spawnPositionType == Level.PositionType.Cave || spawnPositionType == Level.PositionType.Wreck ? 0.0f : Level.Loaded.Size.X * 0.3f; - Level.Loaded.TryGetInterestingPosition(true, spawnPositionType, 0.0f, out Vector2 nestPosition); + + nestPosition = Level.Loaded.GetRandomItemPos(spawnPositionType, 100.0f, minDistance, 30.0f); List spawnEdges = new List(); if (spawnPositionType == Level.PositionType.Cave) { @@ -149,20 +150,21 @@ namespace Barotrauma if (!spawnEdges.Any()) { GraphEdge closestEdge = null; - float closestDist = float.PositiveInfinity; + float closestDistSqr = float.PositiveInfinity; foreach (var edge in nearbyCells.SelectMany(c => c.Edges)) { if (!edge.NextToCave || !edge.IsSolid) { continue; } float dist = Vector2.DistanceSquared(edge.Center, nestPosition); - if (dist < closestDist) + if (dist < closestDistSqr) { closestEdge = edge; - closestDist = dist; + closestDistSqr = dist; } } if (closestEdge != null) { spawnEdges.Add(closestEdge); + itemSpawnRadius = Math.Max(itemSpawnRadius, (float)Math.Sqrt(closestDistSqr) * 1.5f); } } } diff --git a/Barotrauma/BarotraumaShared/SharedSource/GameSession/UpgradeManager.cs b/Barotrauma/BarotraumaShared/SharedSource/GameSession/UpgradeManager.cs index 1fa008ede..63c55fad1 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/GameSession/UpgradeManager.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/GameSession/UpgradeManager.cs @@ -427,7 +427,7 @@ namespace Barotrauma { if (!(secondLinkedEntity is Item linkedItem) || linkedItem == item) { continue; } if (linkedItem.AllowSwapping && - linkedItem.Prefab.SwappableItem != null && linkedItem.Prefab.SwappableItem.CanBeBought && + linkedItem.Prefab.SwappableItem != null && (linkedItem.Prefab.SwappableItem.CanBeBought || item.Prefab.SwappableItem.ReplacementOnUninstall == linkedItem.prefab.Identifier) && linkedItem.Prefab.SwappableItem.SwapIdentifier.Equals(item.Prefab.SwappableItem.SwapIdentifier, StringComparison.OrdinalIgnoreCase)) { linkedItems.Add(linkedItem); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/CharacterInventory.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/CharacterInventory.cs index f3cbf7c94..49bfdb3e8 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/CharacterInventory.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/CharacterInventory.cs @@ -132,17 +132,17 @@ namespace Barotrauma return false; } - public override bool CanBePut(Item item, int i, bool ignoreCondition = false) + public override bool CanBePutInSlot(Item item, int i, bool ignoreCondition = false) { return - base.CanBePut(item, i, ignoreCondition) && item.AllowedSlots.Any(s => s.HasFlag(SlotTypes[i])) && + base.CanBePutInSlot(item, i, ignoreCondition) && item.AllowedSlots.Any(s => s.HasFlag(SlotTypes[i])) && (SlotTypes[i] == InvSlotType.Any || slots[i].ItemCount < 1); } - public override bool CanBePut(ItemPrefab itemPrefab, int i, float? condition) + public override bool CanBePutInSlot(ItemPrefab itemPrefab, int i, float? condition) { return - base.CanBePut(itemPrefab, i, condition) && + base.CanBePutInSlot(itemPrefab, i, condition) && (SlotTypes[i] == InvSlotType.Any || slots[i].ItemCount < 1); } @@ -261,7 +261,7 @@ namespace Barotrauma /// /// If there is room, puts the item in the inventory and returns true, otherwise returns false /// - public override bool TryPutItem(Item item, Character user, IEnumerable allowedSlots = null, bool createNetworkEvent = true) + public override bool TryPutItem(Item item, Character user, IEnumerable allowedSlots = null, bool createNetworkEvent = true, bool ignoreCondition = false) { if (allowedSlots == null || !allowedSlots.Any()) { return false; } if (item == null) @@ -326,7 +326,7 @@ namespace Barotrauma #if CLIENT if (PersonalSlots.HasFlag(SlotTypes[i])) { hidePersonalSlots = false; } #endif - if (!slots[i].First().AllowedSlots.Contains(InvSlotType.Any) || !TryPutItem(slots[i].FirstOrDefault(), character, new List { InvSlotType.Any }, true)) + if (!slots[i].First().AllowedSlots.Contains(InvSlotType.Any) || !TryPutItem(slots[i].FirstOrDefault(), character, new List { InvSlotType.Any }, true, ignoreCondition)) { free = false; #if CLIENT @@ -371,7 +371,7 @@ namespace Barotrauma for (int i = 0; i < capacity; i++) { if (SlotTypes[i] != InvSlotType.Any) { continue; } - if (!slots[i].Empty() && CanBePut(item, i)) + if (!slots[i].Empty() && CanBePutInSlot(item, i)) { return i; } @@ -387,7 +387,7 @@ namespace Barotrauma for (int i = 0; i < capacity; i++) { if (SlotTypes[i] != InvSlotType.Any) { continue; } - if (CanBePut(item, i)) + if (CanBePutInSlot(item, i)) { return i; } @@ -402,14 +402,14 @@ namespace Barotrauma } else { - if (!CanBePut(item, i)) { continue; } + if (!CanBePutInSlot(item, i)) { continue; } } return i; } return -1; } - public override bool TryPutItem(Item item, int index, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent = true) + public override bool TryPutItem(Item item, int index, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent = true, bool ignoreCondition = false) { if (index < 0 || index >= slots.Length) { @@ -424,7 +424,7 @@ namespace Barotrauma if (slots[index].Any()) { if (slots[index].Contains(item)) { return false; } - return base.TryPutItem(item, index, allowSwapping, allowCombine, user, createNetworkEvent); + return base.TryPutItem(item, index, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition); } if (SlotTypes[index] == InvSlotType.Any) @@ -460,7 +460,7 @@ namespace Barotrauma if (!slotsFree) { return false; } - return TryPutItem(item, user, new List() { placeToSlots }, createNetworkEvent); + return TryPutItem(item, user, new List() { placeToSlots }, createNetworkEvent, ignoreCondition); } } } diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Holdable/RepairTool.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Holdable/RepairTool.cs index 617ef4cc0..ddf06b33f 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Holdable/RepairTool.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Holdable/RepairTool.cs @@ -342,7 +342,7 @@ namespace Barotrauma.Items.Components allowInsideFixture: true); hitBodies.Clear(); - hitBodies.AddRange(bodies); + hitBodies.AddRange(bodies.Distinct()); lastPickedFraction = Submarine.LastPickedFraction; Type lastHitType = null; diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemContainer.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemContainer.cs index 1c1a7aafc..5502221ae 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemContainer.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemContainer.cs @@ -483,7 +483,7 @@ namespace Barotrauma.Items.Components foreach (ushort id in itemIds[i]) { if (!(Entity.FindEntityByID(id) is Item item)) { continue; } - Inventory.TryPutItem(item, i, false, false, null, false); + Inventory.TryPutItem(item, i, false, false, null, createNetworkEvent: false, ignoreCondition: true); } } itemIds = null; diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs index 2894aa450..575401584 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs @@ -211,7 +211,7 @@ namespace Barotrauma.Items.Components { for (int i = inputContainer.Inventory.Capacity - 2; i >= 0; i--) { - while (inputContainer.Inventory.GetItemAt(i) is Item item1 && inputContainer.Inventory.CanBePut(item1, i + 1)) + while (inputContainer.Inventory.GetItemAt(i) is Item item1 && inputContainer.Inventory.CanBePutInSlot(item1, i + 1)) { if (!inputContainer.Inventory.TryPutItem(item1, i + 1, allowSwapping: false, allowCombine: false, user: null, createNetworkEvent: true)) { diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Fabricator.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Fabricator.cs index b10901962..ba0fd4715 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Fabricator.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Fabricator.cs @@ -170,7 +170,7 @@ namespace Barotrauma.Items.Components private void StartFabricating(FabricationRecipe selectedItem, Character user, bool addToServerLog = true) { if (selectedItem == null) { return; } - if (!outputContainer.Inventory.CanBePut(selectedItem.TargetItem, selectedItem.OutCondition)) { return; } + if (!outputContainer.Inventory.CanBePut(selectedItem.TargetItem, selectedItem.OutCondition * selectedItem.TargetItem.Health)) { return; } #if CLIENT itemList.Enabled = false; @@ -308,7 +308,7 @@ namespace Barotrauma.Items.Components } Character tempUser = user; - int amountFittingContainer = outputContainer.Inventory.HowManyCanBePut(fabricatedItem.TargetItem, fabricatedItem.OutCondition); + int amountFittingContainer = outputContainer.Inventory.HowManyCanBePut(fabricatedItem.TargetItem, fabricatedItem.OutCondition * fabricatedItem.TargetItem.Health); for (int i = 0; i < fabricatedItem.Amount; i++) { if (i < amountFittingContainer) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Inventory.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Inventory.cs index fb26bafea..a259d4246 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Inventory.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Inventory.cs @@ -380,7 +380,7 @@ namespace Barotrauma return ownerItem.ParentInventory.ItemOwnsSelf(item); } - public virtual int FindAllowedSlot(Item item) + public virtual int FindAllowedSlot(Item item, bool ignoreCondition = false) { if (ItemOwnsSelf(item)) { return -1; } @@ -392,7 +392,7 @@ namespace Barotrauma for (int i = 0; i < capacity; i++) { - if (slots[i].CanBePut(item)) { return i; } + if (slots[i].CanBePut(item, ignoreCondition)) { return i; } } return -1; @@ -405,7 +405,7 @@ namespace Barotrauma { for (int i = 0; i < capacity; i++) { - if (CanBePut(item, i)) { return true; } + if (CanBePutInSlot(item, i)) { return true; } } return false; } @@ -413,7 +413,7 @@ namespace Barotrauma /// /// Can the item be put in the specified slot. /// - public virtual bool CanBePut(Item item, int i, bool ignoreCondition = false) + public virtual bool CanBePutInSlot(Item item, int i, bool ignoreCondition = false) { if (ItemOwnsSelf(item)) { return false; } if (i < 0 || i >= slots.Length) { return false; } @@ -424,12 +424,12 @@ namespace Barotrauma { for (int i = 0; i < capacity; i++) { - if (CanBePut(itemPrefab, i, condition)) { return true; } + if (CanBePutInSlot(itemPrefab, i, condition)) { return true; } } return false; } - public virtual bool CanBePut(ItemPrefab itemPrefab, int i, float? condition = null) + public virtual bool CanBePutInSlot(ItemPrefab itemPrefab, int i, float? condition = null) { if (i < 0 || i >= slots.Length) { return false; } return slots[i].CanBePut(itemPrefab, condition); @@ -454,16 +454,16 @@ namespace Barotrauma /// /// If there is room, puts the item in the inventory and returns true, otherwise returns false /// - public virtual bool TryPutItem(Item item, Character user, IEnumerable allowedSlots = null, bool createNetworkEvent = true) + public virtual bool TryPutItem(Item item, Character user, IEnumerable allowedSlots = null, bool createNetworkEvent = true, bool ignoreCondition = false) { - int slot = FindAllowedSlot(item); + int slot = FindAllowedSlot(item, ignoreCondition); if (slot < 0) { return false; } PutItem(item, slot, user, true, createNetworkEvent); return true; } - public virtual bool TryPutItem(Item item, int i, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent = true) + public virtual bool TryPutItem(Item item, int i, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent = true, bool ignoreCondition = false) { if (i < 0 || i >= slots.Length) { @@ -481,12 +481,12 @@ namespace Barotrauma //item in the slot removed as a result of combining -> put this item in the now free slot if (!slots[i].Any()) { - return TryPutItem(item, i, allowSwapping, allowCombine, user, createNetworkEvent); + return TryPutItem(item, i, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition); } return true; } } - if (CanBePut(item, i)) + if (CanBePutInSlot(item, i, ignoreCondition)) { PutItem(item, i, user, true, createNetworkEvent); return true; diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/ItemInventory.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/ItemInventory.cs index 1ab7f1687..d449ad8c9 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/ItemInventory.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/ItemInventory.cs @@ -21,7 +21,7 @@ namespace Barotrauma this.container = container; } - public override int FindAllowedSlot(Item item) + public override int FindAllowedSlot(Item item, bool ignoreCondition = false) { if (ItemOwnsSelf(item)) { return -1; } @@ -32,18 +32,18 @@ namespace Barotrauma //try to stack first for (int i = 0; i < capacity; i++) { - if (slots[i].Any() && CanBePut(item, i)) { return i; } + if (slots[i].Any() && CanBePutInSlot(item, i, ignoreCondition)) { return i; } } for (int i = 0; i < capacity; i++) { - if (CanBePut(item, i)) { return i; } + if (CanBePutInSlot(item, i, ignoreCondition)) { return i; } } return -1; } - public override bool CanBePut(Item item, int i, bool ignoreCondition = false) + public override bool CanBePutInSlot(Item item, int i, bool ignoreCondition = false) { if (ItemOwnsSelf(item)) { return false; } if (i < 0 || i >= slots.Length) { return false; } @@ -51,7 +51,7 @@ namespace Barotrauma return item != null && slots[i].CanBePut(item, ignoreCondition) && slots[i].ItemCount < container.MaxStackSize; } - public override bool CanBePut(ItemPrefab itemPrefab, int i, float? condition) + public override bool CanBePutInSlot(ItemPrefab itemPrefab, int i, float? condition) { if (i < 0 || i >= slots.Length) { return false; } if (!container.CanBeContained(itemPrefab)) { return false; } @@ -88,9 +88,9 @@ namespace Barotrauma return true; } - public override bool TryPutItem(Item item, Character user, IEnumerable allowedSlots = null, bool createNetworkEvent = true) + public override bool TryPutItem(Item item, Character user, IEnumerable allowedSlots = null, bool createNetworkEvent = true, bool ignoreCondition = false) { - bool wasPut = base.TryPutItem(item, user, allowedSlots, createNetworkEvent); + bool wasPut = base.TryPutItem(item, user, allowedSlots, createNetworkEvent, ignoreCondition); if (wasPut) { @@ -108,9 +108,9 @@ namespace Barotrauma return wasPut; } - public override bool TryPutItem(Item item, int i, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent = true) + public override bool TryPutItem(Item item, int i, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent = true, bool ignoreCondition = false) { - bool wasPut = base.TryPutItem(item, i, allowSwapping, allowCombine, user, createNetworkEvent); + bool wasPut = base.TryPutItem(item, i, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition); if (wasPut && item.ParentInventory == this) { foreach (Character c in Character.CharacterList) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs index e104b4ccc..5a0c3bd8c 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs @@ -2724,7 +2724,7 @@ namespace Barotrauma if (tries == 10) { - position = EndPosition - Vector2.UnitY * 300.0f; + position = startPos; } } while (tries < 10); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs index 645e8e28c..2270e5d69 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs @@ -1266,7 +1266,7 @@ namespace Barotrauma { List<(ItemContainer container, int freeSlots)> containers = new List<(ItemContainer container, int freeSlots)>(); var connectedSubs = GetConnectedSubs(); - foreach (Item item in Item.ItemList) + foreach (Item item in Item.ItemList.ToList()) { if (!connectedSubs.Contains(item.Submarine)) { continue; } if (!item.HasTag("cargocontainer")) { continue; } diff --git a/Barotrauma/BarotraumaShared/Submarines/Remora.sub b/Barotrauma/BarotraumaShared/Submarines/Remora.sub index 3b45491dc..ccce067ae 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Remora.sub and b/Barotrauma/BarotraumaShared/Submarines/Remora.sub differ diff --git a/Barotrauma/BarotraumaShared/Submarines/RemoraDrone.sub b/Barotrauma/BarotraumaShared/Submarines/RemoraDrone.sub index aea6bb39b..4751d3daf 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/RemoraDrone.sub and b/Barotrauma/BarotraumaShared/Submarines/RemoraDrone.sub differ diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index 62882e00e..063a29e4c 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,5 +1,34 @@ --------------------------------------------------------------------------------------------------------- -v0.14.7.0 +v0.1400.8.0 +--------------------------------------------------------------------------------------------------------- + +Changes: +- Hide the equipment slots and character portait in wiring mode. +- Added platforms behind Remora Drone's hatches. + +Fixes: +- Fixed "entity not found" error when ending a pirate mission round after any of the pirates have been killed in multiplayer campaign. +- Fixed crashing when trying to spawn inventory items for a character who left before respawning during the previous round. +- Fixed bots following the player when trying to heal them even when they don't have the required items. +- Fixed bots suffocating when they run out of oxygen tanks if ordered to wait wearing a suit. +- Fixed bots not equipping a diving suit when they already have a mask when following a target that has a suit equipped. +- Fixed biome noise loops still playing after the round ends. +- Fixed detonator rapidly draining condition from flash powder and incendium instead of exploding them immediately (potentially resulting in partially used items). +- Fixed inability to drag/combine items in cabinets in the sub editor (unstable only). +- Fixed inability to place items into a stack in the sub editor when the container is full (unstable only). +- Fixed fabricators still being unable to craft some items when the output slot is not empty, even if the item is stackable (unstable only). +- Fixed stacks of half-used items dropping from cabinets between rounds. +- Another attempt to fix "collection was modifed" exception when instantiating cargo missions in multiplayer. +- Fixed submarine upgrade menu displaying the same name for different types of turrets linked to the same loader (unstable only). +- Fixed turret hardpoints linked to the same loader as some turret not getting swapped alongside the turret (unstable only). +- Fixed nest missions sometimes completing immediately, because the eggs spawn far enough from the initially chosen spawnpoint to be considered "taken away" from the cave (unstable only). +- Fixed exploit in plastiseal crafting recipe (plastiseal deconstructing to 1 bandage even though 1 bandage can be used to craft 2 plastiseal). +- Fixed RepairTools applying their effects multiple times to items whose bodies consist of multiple fixtures. Caused minerals to get deattached 3 times faster than they should. +- Fixed AFK kicks when staying in any of the campaign UIs (store, etc) or other input-blocking menus for too long. +- Fixed monsters sometimes targeting owners of targeted items although the owner is ignored. + +--------------------------------------------------------------------------------------------------------- +v0.1400.7.0 --------------------------------------------------------------------------------------------------------- Changes: