Skip to content

Commit

Permalink
Release 0.14.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
3e849f2e5c committed Aug 25, 2021
1 parent 27dd9e6 commit 4a9727e
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ private static void DrawCharacterHoverTexts(SpriteBatch spriteBatch, Camera cam,
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ public static CharacterHealth OpenHealthWindow
}
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)
{
Expand Down Expand Up @@ -429,7 +432,7 @@ partial void InitProjSpecific(XElement element, Character character)
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)
{
Expand All @@ -438,7 +441,7 @@ partial void InitProjSpecific(XElement element, Character character)
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);
});


Expand Down Expand Up @@ -821,7 +824,7 @@ public void UpdateHUD(float deltaTime)
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;
Expand Down Expand Up @@ -978,7 +981,7 @@ public void UpdateHUD(float deltaTime)
}

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private void DrawCharacterInfo(SpriteBatch spriteBatch, Character target, float
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);
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaClient/LinuxClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1400.8.0</Version>
<Version>0.14.9.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaClient/MacClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1400.8.0</Version>
<Version>0.14.9.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaClient/WindowsClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1400.8.0</Version>
<Version>0.14.9.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaServer/LinuxServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1400.8.0</Version>
<Version>0.14.9.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaServer/MacServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1400.8.0</Version>
<Version>0.14.9.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaServer/WindowsServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1400.8.0</Version>
<Version>0.14.9.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void GiveTreatment(float deltaTime)
{
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;
Expand Down
12 changes: 9 additions & 3 deletions Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ public float Stun

public CharacterHealth CharacterHealth { get; private set; }

public bool DisableHealthWindow;

public float Vitality
{
get { return CharacterHealth.Vitality; }
Expand Down Expand Up @@ -2320,14 +2322,13 @@ private void TransformCursorPos()

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;
}
Expand Down Expand Up @@ -2387,6 +2388,7 @@ public void DoInteractionUpdate(float deltaTime, Vector2 mouseSimPos)
}
else
{
FocusedCharacter = null;
focusedItem = null;
}
findFocusedTimer -= deltaTime;
Expand Down Expand Up @@ -2714,6 +2716,10 @@ public virtual void Update(float deltaTime, Camera cam)
{
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))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public override void Update(float deltaTime)
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,10 @@ private IEnumerable<object> DoCharacterWait(Character npc, Character interactor)
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)
{
Expand Down
43 changes: 13 additions & 30 deletions Barotrauma/BarotraumaShared/changelog.txt
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4a9727e

Please sign in to comment.