diff --git a/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs b/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs
index 4cbace2fb..b208ae945 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Characters/CharacterHUD.cs
@@ -548,7 +548,9 @@ namespace Barotrauma
GUI.Style.Green, Color.Black, 2, GUI.SmallFont);
textPos.Y += largeTextSize.Y;
}
- if (character.FocusedCharacter.CharacterHealth.UseHealthWindow && character.CanInteractWith(character.FocusedCharacter, 160f, false))
+ if (!character.DisableHealthWindow &&
+ character.FocusedCharacter.CharacterHealth.UseHealthWindow &&
+ character.CanInteractWith(character.FocusedCharacter, 160f, false))
{
GUI.DrawString(spriteBatch, textPos, GetCachedHudText("HealHint", GameMain.Config.KeyBindText(InputType.Health)),
GUI.Style.Green, Color.Black, 2, GUI.SmallFont);
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs b/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs
index 9ff6e562a..4dc901c4f 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Characters/Health/CharacterHealth.cs
@@ -201,10 +201,13 @@ namespace Barotrauma
}
set
{
- if (openHealthWindow == value) return;
- if (value != null && !value.UseHealthWindow) return;
+ if (openHealthWindow == value) { return; }
+ if (value != null)
+ {
+ if (!value.UseHealthWindow || value.Character.DisableHealthWindow) { return; }
+ }
- var prevOpenHealthWindow = openHealthWindow;
+ var prevOpenHealthWindow = openHealthWindow;
if (prevOpenHealthWindow != null)
{
@@ -429,7 +432,7 @@ namespace Barotrauma
new GUICustomComponent(new RectTransform(new Vector2(0.2f, 1.0f), nameContainer.RectTransform, Anchor.CenterLeft),
onDraw: (spriteBatch, component) =>
{
- character.Info.DrawPortrait(spriteBatch, new Vector2(component.Rect.X, component.Rect.Center.Y - component.Rect.Width / 2), Vector2.Zero, component.Rect.Width, false, openHealthWindow?.Character != Character.Controlled);
+ character.Info?.DrawPortrait(spriteBatch, new Vector2(component.Rect.X, component.Rect.Center.Y - component.Rect.Width / 2), Vector2.Zero, component.Rect.Width, false, openHealthWindow?.Character != Character.Controlled);
});
characterName = new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), nameContainer.RectTransform), "", textAlignment: Alignment.CenterLeft, font: GUI.SubHeadingFont)
{
@@ -438,7 +441,7 @@ namespace Barotrauma
new GUICustomComponent(new RectTransform(new Vector2(0.2f, 1.0f), nameContainer.RectTransform),
onDraw: (spriteBatch, component) =>
{
- character.Info.DrawJobIcon(spriteBatch, component.Rect, openHealthWindow?.Character != Character.Controlled);
+ character.Info?.DrawJobIcon(spriteBatch, component.Rect, openHealthWindow?.Character != Character.Controlled);
});
@@ -821,7 +824,7 @@ namespace Barotrauma
OpenHealthWindow = null;
}
else if (Character.Controlled == Character &&
- (Character.Controlled.FocusedCharacter?.CharacterHealth == null || !Character.Controlled.FocusedCharacter.CharacterHealth.UseHealthWindow))
+ (Character.Controlled.FocusedCharacter?.CharacterHealth == null || !Character.Controlled.FocusedCharacter.CharacterHealth.UseHealthWindow || Character.Controlled.FocusedCharacter.DisableHealthWindow))
{
OpenHealthWindow = this;
forceAfflictionContainerUpdate = true;
@@ -978,7 +981,7 @@ namespace Barotrauma
}
healthBarHolder.CanBeFocused = healthBar.CanBeFocused = healthBarShadow.CanBeFocused = !Character.ShouldLockHud();
- if (Character.AllowInput && UseHealthWindow && healthBar.Enabled && healthBar.CanBeFocused &&
+ if (Character.AllowInput && UseHealthWindow && !Character.DisableHealthWindow && healthBar.Enabled && healthBar.CanBeFocused &&
(GUI.IsMouseOn(healthBar) || highlightedAfflictionIcon != null) && Inventory.SelectedSlot == null)
{
healthBar.State = GUIComponent.ComponentState.Hover;
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/StatusHUD.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/StatusHUD.cs
index 8b9e7cf42..04313fee8 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/StatusHUD.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/StatusHUD.cs
@@ -186,7 +186,7 @@ namespace Barotrauma.Items.Components
texts.Add(CharacterHUD.GetCachedHudText("PlayHint", GameMain.Config.KeyBindText(InputType.Use)));
textColors.Add(GUI.Style.Green);
}
- if (target.CharacterHealth.UseHealthWindow && equipper?.FocusedCharacter == target && equipper.CanInteractWith(target, 160f, false))
+ if (target.CharacterHealth.UseHealthWindow && !target.DisableHealthWindow && equipper?.FocusedCharacter == target && equipper.CanInteractWith(target, 160f, false))
{
texts.Add(CharacterHUD.GetCachedHudText("HealHint", GameMain.Config.KeyBindText(InputType.Health)));
textColors.Add(GUI.Style.Green);
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index 7c10848a3..62c0cd40a 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.1400.8.0
+ 0.14.9.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 85713573d..ac537775c 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.1400.8.0
+ 0.14.9.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index 38d414390..c597f6633 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.1400.8.0
+ 0.14.9.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index 1d407fe78..4c90c5c2e 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.1400.8.0
+ 0.14.9.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index 9448e89ee..403968026 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.1400.8.0
+ 0.14.9.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index 75e9d31a6..d5b2ff207 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.1400.8.0
+ 0.14.9.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs
index c8596dbb2..e9e310f16 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveRescue.cs
@@ -282,7 +282,7 @@ namespace Barotrauma
{
Item matchingItem = character.Inventory.FindItemByIdentifier(treatmentSuitability.Key, true);
if (matchingItem == null) { continue; }
- character.SelectCharacter(targetCharacter);
+ if (targetCharacter != character) { character.SelectCharacter(targetCharacter); }
ApplyTreatment(affliction, matchingItem);
//wait a bit longer after applying a treatment to wait for potential side-effects to manifest
treatmentTimer = TreatmentDelay * 4;
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
index 62345dc03..8c2506cc9 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
@@ -638,6 +638,8 @@ namespace Barotrauma
public CharacterHealth CharacterHealth { get; private set; }
+ public bool DisableHealthWindow;
+
public float Vitality
{
get { return CharacterHealth.Vitality; }
@@ -2320,14 +2322,13 @@ namespace Barotrauma
public void SelectCharacter(Character character)
{
- if (character == null) return;
-
+ if (character == null || character == this) { return; }
SelectedCharacter = character;
}
public void DeselectCharacter()
{
- if (SelectedCharacter == null) return;
+ if (SelectedCharacter == null) { return; }
SelectedCharacter.AnimController?.ResetPullJoints();
SelectedCharacter = null;
}
@@ -2387,6 +2388,7 @@ namespace Barotrauma
}
else
{
+ FocusedCharacter = null;
focusedItem = null;
}
findFocusedTimer -= deltaTime;
@@ -2714,6 +2716,10 @@ namespace Barotrauma
{
IsRagdolled = IsForceRagdolled;
}
+ else if (this != Controlled)
+ {
+ IsRagdolled = IsKeyDown(InputType.Ragdoll);
+ }
//Keep us ragdolled if we were forced or we're too speedy to unragdoll
else if (allowRagdoll && (!IsRagdolled || !tooFastToUnragdoll))
{
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Events/EventActions/TriggerAction.cs b/Barotrauma/BarotraumaShared/SharedSource/Events/EventActions/TriggerAction.cs
index e4855e9a2..97bd587e8 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Events/EventActions/TriggerAction.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Events/EventActions/TriggerAction.cs
@@ -142,7 +142,7 @@ namespace Barotrauma
npcOrItem = item;
item.CampaignInteractionType = CampaignMode.InteractionType.Examine;
if (player.SelectedConstruction == item ||
- player.Inventory.Contains(item) ||
+ player.Inventory != null && player.Inventory.Contains(item) ||
(player.FocusedItem == item && player.IsKeyHit(InputType.Use)))
{
Trigger(e1, e2);
diff --git a/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs b/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs
index 02b62c419..9c7e037e4 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/GameSession/GameModes/CampaignMode.cs
@@ -732,10 +732,10 @@ namespace Barotrauma
public void AssignNPCMenuInteraction(Character character, InteractionType interactionType)
{
character.CampaignInteractionType = interactionType;
- character.CharacterHealth.UseHealthWindow =
- interactionType == InteractionType.None ||
- interactionType == InteractionType.Examine ||
- interactionType == InteractionType.Talk;
+ character.DisableHealthWindow =
+ interactionType != InteractionType.None &&
+ interactionType != InteractionType.Examine &&
+ interactionType != InteractionType.Talk;
if (interactionType == InteractionType.None)
{
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index 063a29e4c..02351378a 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,34 +1,5 @@
---------------------------------------------------------------------------------------------------------
-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
+v0.14.9.0
---------------------------------------------------------------------------------------------------------
Changes:
@@ -41,12 +12,15 @@ Changes:
- Security's stun guns spawn fully loaded.
- Reduced escort missions' base commonness. Doesn't have an effect in the campaign because the commonness is defined in the mission events, but fixes escort missions being much more common than other mission types in mission mode.
- Destroying a reactor with explosives depletes the fuel rods.
+- Hide the equipment slots and character portait in wiring mode.
+- Added platforms behind Remora Drone's hatches.
Fixes:
- Fixed enemies sometimes not spawning at all during a mission. Happened when the game selected the "stowaway" event to occur during the mission.
- Fixed pirate and escort missions not being available from late-game outposts.
- Fixed occasional "unauthorized multithreaded access to RandSync.Server" errors when starting a pirate mission in multiplayer.
- Fixed crashing with a "E_INVALIDARG" SharpDXException if an ice spire happens to generate on a very short level wall edge.
+- Fixed crashing when trying to spawn inventory items for a character who left before respawning during the previous round.
- Fixed batteries always recharging at "full speed" when not full, regardless of how much power is being drawn from the battery. E.g. a battery that's only connected to a lamp drawing 5 kW of power would always recharge at the full 500 kWmin.
- Fixed traitor items sometimes spawning in non-interactable or hidden containers.
- Fixed turret rotation limit widgets working unreliably in the sub editor.
@@ -72,6 +46,7 @@ Fixes:
- Fixed nav terminal labels sometimes being draw under linked status monitor HUDs.
- Fixed bots sometimes not fixing airlock doors/hatches. More specifically, doors whose center point was outside a hull.
- Fixed medic bots grabbing the target and never letting go when there's no suitable treatments available anywhere in the sub, or when they're in an outpost and not carrying any suitable treatments.
+- Fixed bots suffocating when they run out of oxygen tanks if ordered to wait wearing a suit.
- Fixed ability to select other items when operating periscopes. Didn't cause problems in vanilla subs, but in custom subs where the turret was placed close to the periscope and other interactable items, it was possible to accidentally select something else when trying to fire.
- Made nav terminal's "velocity_in" input change the target velocity, not just the steering input, making it possible to adjust the velocity with signals when using autopilot.
- Fixed text fields in a component's editing menu not refreshing until you've interacted with another component.
@@ -118,6 +93,14 @@ Fixes:
- Fixed canister shells refilling automatically between rounds.
- Fixed turrets working with incorrect loader types (e.g. coilgun being able to fire laser bolts when linked to a pulse laser loader).
- Fixed "exterior pressure exceeds diving suit capabilities" hint popping up when carrying a diving suit.
+- 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 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.
+- Fixed some items held in the left hand rendering in front of the character's thigh.
+- Fixed characters being focusable through UI elements (e.g. item interfaces), causing accidental interactions when the NPC interaction key is bind to LMB.
Modding:
- Added support for "additive" event sets which get added on top of another normal event set, allowing mods to spawn additional types of monsters without having to touch the vanilla event sets. See the "transitevents" event set in OutpostEvents.xml for an usage example.