From 6f3d9d71916162a57b5bd36cde26d573fccc2440 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 15 Jun 2019 19:43:52 +0300 Subject: [PATCH] (7ae08a816) Incremented version number, changelog update --- .../Properties/AssemblyInfo.cs | 4 +- .../BarotraumaClient/Source/Map/MapEntity.cs | 36 +++++++++++++++ .../Properties/AssemblyInfo.cs | 4 +- .../Source/Characters/Character.cs | 44 ++++++++++--------- .../BarotraumaShared/Source/Map/Structure.cs | 7 +++ Barotrauma/BarotraumaShared/changelog.txt | 7 +++ 6 files changed, 78 insertions(+), 24 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs b/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs index fd04d73aa..8e6e3a82f 100644 --- a/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs +++ b/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.0.5")] -[assembly: AssemblyFileVersion("0.9.0.5")] +[assembly: AssemblyVersion("0.9.0.6")] +[assembly: AssemblyFileVersion("0.9.0.6")] diff --git a/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs b/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs index b30101b37..ddbdb63cc 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs @@ -578,6 +578,42 @@ namespace Barotrauma editingHUD = null; } } + + if ((PlayerInput.KeyDown(Keys.LeftControl) || PlayerInput.KeyDown(Keys.RightControl))) + { + if (PlayerInput.KeyHit(Keys.N)) + { + float minX = selectedList[0].WorldRect.X, maxX = selectedList[0].WorldRect.Right; + for (int i = 0; i < selectedList.Count; i++) + { + minX = Math.Min(minX, selectedList[i].WorldRect.X); + maxX = Math.Max(maxX, selectedList[i].WorldRect.Right); + } + + float centerX = (minX + maxX) / 2.0f; + foreach (MapEntity me in selectedList) + { + me.FlipX(false); + me.Move(new Vector2((centerX - me.WorldPosition.X) * 2.0f, 0.0f)); + } + } + else if (PlayerInput.KeyHit(Keys.M)) + { + float minY = selectedList[0].WorldRect.Y - selectedList[0].WorldRect.Height, maxY = selectedList[0].WorldRect.Y; + for (int i = 0; i < selectedList.Count; i++) + { + minY = Math.Min(minY, selectedList[i].WorldRect.Y - selectedList[i].WorldRect.Height); + maxY = Math.Max(maxY, selectedList[i].WorldRect.Y); + } + + float centerY = (minY + maxY) / 2.0f; + foreach (MapEntity me in selectedList) + { + me.FlipY(false); + me.Move(new Vector2(0.0f, (centerY - me.WorldPosition.Y) * 2.0f)); + } + } + } FilteredSelectedList.Clear(); if (selectedList.Count == 0) return; foreach (var e in selectedList) diff --git a/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs b/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs index da654b402..2ccbcdb86 100644 --- a/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs +++ b/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.0.5")] -[assembly: AssemblyFileVersion("0.9.0.5")] +[assembly: AssemblyVersion("0.9.0.6")] +[assembly: AssemblyFileVersion("0.9.0.6")] diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs index 009275bc1..2b6f9f194 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs @@ -842,10 +842,33 @@ namespace Barotrauma { humanConfigFile = GetConfigFile("Human"); } - return humanConfigFile; + return characterConfigFiles; } } + public static string GetConfigFile(string speciesName, ContentPackage contentPackage = null) + { + string configFile = null; + if (contentPackage == null) + { + configFile = GameMain.Instance.GetFilesOfType(ContentType.Character, searchAllContentPackages: true) + .FirstOrDefault(c => Path.GetFileName(c).ToLowerInvariant() == $"{speciesName.ToLowerInvariant()}.xml"); + } + else + { + configFile = contentPackage.GetFilesOfType(ContentType.Character)? + .FirstOrDefault(c => Path.GetFileName(c).ToLowerInvariant() == $"{speciesName.ToLowerInvariant()}.xml"); + } + + if (configFile == null) + { + DebugConsole.ThrowError($"Couldn't find a config file for {speciesName} from the selected content packages!"); + DebugConsole.ThrowError($"(The config file must end with \"{speciesName}.xml\")"); + return string.Empty; + } + return configFile; + } + private static IEnumerable characterConfigFiles; private static IEnumerable CharacterConfigFiles { @@ -920,25 +943,6 @@ namespace Barotrauma } return characterConfigFiles; } - } - - /// - /// Searches for a character config file from all currently selected content packages, - /// or from a specific package if the contentPackage parameter is given. - /// - public static string GetConfigFile(string speciesName, ContentPackage contentPackage = null) - { - string configFile = null; - if (contentPackage == null) - { - configFile = GameMain.Instance.GetFilesOfType(ContentType.Character) - .FirstOrDefault(c => Path.GetFileName(c).ToLowerInvariant() == $"{speciesName.ToLowerInvariant()}.xml"); - } - else - { - configFile = contentPackage.GetFilesOfType(ContentType.Character)? - .FirstOrDefault(c => Path.GetFileName(c).ToLowerInvariant() == $"{speciesName.ToLowerInvariant()}.xml"); - } #endif if (configFile == null) diff --git a/Barotrauma/BarotraumaShared/Source/Map/Structure.cs b/Barotrauma/BarotraumaShared/Source/Map/Structure.cs index c36ab9215..f8f14717d 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Structure.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Structure.cs @@ -373,6 +373,13 @@ namespace Barotrauma return Name; } + partial void InitProjSpecific(); + + public override string ToString() + { + return Name; + } + public override MapEntity Clone() { var clone = new Structure(rect, Prefab, Submarine) diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index 7092e37b0..0b04fa32e 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,3 +1,10 @@ +--------------------------------------------------------------------------------------------------------- +v0.9.0.6 +--------------------------------------------------------------------------------------------------------- + +- Fixed clients failing to connect to servers that have banned clients based on their Steam ID. +- Removed Berilia (vanilla sub that's not ready for release). + --------------------------------------------------------------------------------------------------------- v0.9.0.5 ---------------------------------------------------------------------------------------------------------