diff --git a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs index 34de3d244..a7b05fc0f 100644 --- a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs +++ b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs @@ -36,16 +36,6 @@ namespace Barotrauma get { return (GameMain.GraphicsWidth / 1920.0f + GameMain.GraphicsHeight / 1080.0f) / 2.0f * GameSettings.HUDScale; } } - public static float xScale - { - get { return GameMain.GraphicsWidth / 1920.0f * GameSettings.HUDScale; } - } - - public static float yScale - { - get { return GameMain.GraphicsHeight / 1080.0f * GameSettings.HUDScale; } - } - public static GUIStyle Style; private static Texture2D t; diff --git a/Barotrauma/BarotraumaClient/Source/GUI/RectTransform.cs b/Barotrauma/BarotraumaClient/Source/GUI/RectTransform.cs index 365a9a2a9..b453de6ed 100644 --- a/Barotrauma/BarotraumaClient/Source/GUI/RectTransform.cs +++ b/Barotrauma/BarotraumaClient/Source/GUI/RectTransform.cs @@ -356,7 +356,7 @@ namespace Barotrauma Point? minSize = null, maxSize = null; if (element.Attribute("minsize") != null) minSize = element.GetAttributePoint("minsize", Point.Zero); - //if (element.Attribute("maxsize") != null) maxSize = element.GetAttributePoint("maxsize", new Point(1000, 1000)); + if (element.Attribute("maxsize") != null) maxSize = element.GetAttributePoint("maxsize", new Point(1000, 1000)); RectTransform rectTransform; if (element.Attribute("relativesize") != null) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs index 6cc78431d..8032483c3 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs @@ -293,7 +293,7 @@ namespace Barotrauma.Tutorials // Room 3 do { yield return null; } while (!mechanic_weldingObjectiveSensor.MotionDetected); - TriggerTutorialSegment(2, GameMain.Config.KeyBind(InputType.Shoot), GameMain.Config.KeyBind(InputType.Aim)); // Welding objective + TriggerTutorialSegment(2, GameMain.Config.KeyBind(InputType.Aim), GameMain.Config.KeyBind(InputType.Shoot)); // Welding objective do { if (!mechanic.HasEquippedItem("divingmask")) @@ -334,14 +334,13 @@ namespace Barotrauma.Tutorials //TriggerTutorialSegment(11, GameMain.Config.KeyBind(InputType.Select), GameMain.Config.KeyBind(InputType.Up), GameMain.Config.KeyBind(InputType.Down), GameMain.Config.KeyBind(InputType.Select)); // Ladder objective //do { yield return null; } while (!mechanic_ladderSensor.MotionDetected); //RemoveCompletedObjective(segments[11]); - yield return new WaitForSeconds(2f); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Mechanic.Radio.News"), ChatMessageType.Radio, null); yield return new WaitForSeconds(1f); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Mechanic.Radio.Fire"), ChatMessageType.Radio, null); - yield return new WaitForSeconds(6f); - + // Room 4 do { yield return null; } while (!mechanic_thirdDoor.IsOpen); + yield return new WaitForSeconds(1f); mechanic_fire = new DummyFireSource(new Vector2(20f, 2f), Item.ItemList.Find(i => i.HasTag("mechanic_fire")).WorldPosition); //do { yield return null; } while (!mechanic_craftingObjectiveSensor.MotionDetected); TriggerTutorialSegment(4); // Deconstruct diff --git a/Barotrauma/BarotraumaClient/Source/GameSettings.cs b/Barotrauma/BarotraumaClient/Source/GameSettings.cs index 94e25720b..b96b2f9c5 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSettings.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSettings.cs @@ -755,7 +755,7 @@ namespace Barotrauma OnClicked = (button, data) => { // TODO: add a prompt - LoadDefaultConfig(); + LoadDefaultConfig(setLanguage: false); CheckBindings(true); RefreshItemMessages(); ApplySettings(); diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Engine.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Engine.cs index 6c7404f03..e7431cb8b 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Engine.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Engine.cs @@ -36,9 +36,7 @@ namespace Barotrauma.Items.Components RelativeSpacing = 0.05f }; - int indicatorSize = (int)(30 * GUI.Scale); - - powerIndicator = new GUITickBox(new RectTransform(new Point(indicatorSize, indicatorSize), content.RectTransform), + powerIndicator = new GUITickBox(new RectTransform(new Point(30, 30), content.RectTransform), TextManager.Get("EnginePowered"), style: "IndicatorLightGreen") { CanBeFocused = false diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs index 9b6cf355e..9ad58876d 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs @@ -108,7 +108,7 @@ namespace Barotrauma.Items.Components foreach (FabricationRecipe fi in fabricationRecipes) { - GUIFrame frame = new GUIFrame(new RectTransform(new Point(itemList.Rect.Width, (int)(30 * GUI.yScale)), itemList.Content.RectTransform), style: null) + GUIFrame frame = new GUIFrame(new RectTransform(new Point(itemList.Rect.Width, 30), itemList.Content.RectTransform), style: null) { UserData = fi, HoverColor = Color.Gold * 0.2f, @@ -116,7 +116,7 @@ namespace Barotrauma.Items.Components ToolTip = fi.TargetItem.Description }; - GUITextBlock textBlock = new GUITextBlock(new RectTransform(Vector2.Zero, frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point((int)(50 * GUI.xScale), 0) }, + GUITextBlock textBlock = new GUITextBlock(new RectTransform(Vector2.Zero, frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point(50, 0) }, fi.DisplayName) { ToolTip = fi.TargetItem.Description @@ -125,7 +125,7 @@ namespace Barotrauma.Items.Components var itemIcon = fi.TargetItem.InventoryIcon ?? fi.TargetItem.sprite; if (itemIcon != null) { - GUIImage img = new GUIImage(new RectTransform(new Point((int)(30 * GUI.Scale)), frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point((int)(3 * GUI.xScale), 0) }, + GUIImage img = new GUIImage(new RectTransform(new Point(30, 30), frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point(3, 0) }, itemIcon, scaleToFit: true) { Color = fi.TargetItem.InventoryIconColor, diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/MiniMap.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/MiniMap.cs index 467bbbb77..81caad11f 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/MiniMap.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/MiniMap.cs @@ -114,9 +114,9 @@ namespace Barotrauma.Items.Components Vector2 textSize = GUI.Font.MeasureString(text); Vector2 textPos = child.Center; if (textPos.X + textSize.X / 2 > submarineContainer.Rect.Right) - textPos.X -= ((textPos.X + textSize.X / 2) - submarineContainer.Rect.Right) + 10 * GUI.xScale; + textPos.X -= ((textPos.X + textSize.X / 2) - submarineContainer.Rect.Right) + 10; if (textPos.X - textSize.X / 2 < submarineContainer.Rect.X) - textPos.X += (submarineContainer.Rect.X - (textPos.X - textSize.X / 2)) + 10 * GUI.xScale; + textPos.X += (submarineContainer.Rect.X - (textPos.X - textSize.X / 2)) + 10; GUI.DrawString(spriteBatch, textPos - textSize / 2, text, Color.Orange * (float)Math.Abs(Math.Sin(Timing.TotalTime)), Color.Black * 0.8f); break; @@ -269,7 +269,7 @@ namespace Barotrauma.Items.Components start.Y = -start.Y; Vector2 end = (sub.HullVertices[(i + 1) % sub.HullVertices.Count] + offset) * displayScale; end.Y = -end.Y; - GUI.DrawLine(spriteBatch, center + start, center + end, Color.DarkCyan * Rand.Range(0.3f, 0.35f), width: (int)(10 * GUI.Scale)); + GUI.DrawLine(spriteBatch, center + start, center + end, Color.DarkCyan * Rand.Range(0.3f, 0.35f), width: 10); } } diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Pump.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Pump.cs index 55caa8d4b..ab54744a6 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Pump.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Pump.cs @@ -44,7 +44,7 @@ namespace Barotrauma.Items.Components GUIFrame paddedFrame = new GUIFrame(new RectTransform(new Vector2(0.9f, 0.8f), GuiFrame.RectTransform, Anchor.Center), style: null); - isActiveSlider = new GUIScrollBar(new RectTransform(new Point((int)(50 * GUI.Scale), (int)(100 * GUI.Scale)), paddedFrame.RectTransform, Anchor.CenterLeft), + isActiveSlider = new GUIScrollBar(new RectTransform(new Point(50, 100), paddedFrame.RectTransform, Anchor.CenterLeft), barSize: 0.2f, style: "OnOffLever") { IsBooleanSwitch = true, @@ -52,7 +52,7 @@ namespace Barotrauma.Items.Components MaxValue = 0.75f }; var sliderHandle = isActiveSlider.GetChild(); - sliderHandle.RectTransform.NonScaledSize = new Point((int)(84 * GUI.Scale), sliderHandle.Rect.Height); + sliderHandle.RectTransform.NonScaledSize = new Point(84, sliderHandle.Rect.Height); isActiveSlider.OnMoved = (GUIScrollBar scrollBar, float barScroll) => { bool active = scrollBar.BarScroll < 0.5f; @@ -73,7 +73,7 @@ namespace Barotrauma.Items.Components var rightArea = new GUILayoutGroup(new RectTransform(new Vector2(0.75f, 1.0f), paddedFrame.RectTransform, Anchor.CenterRight)) { RelativeSpacing = 0.1f }; - powerIndicator = new GUITickBox(new RectTransform(new Point((int)(30 * GUI.Scale)), rightArea.RectTransform), TextManager.Get("PumpPowered"), style: "IndicatorLightGreen") + powerIndicator = new GUITickBox(new RectTransform(new Point(30, 30), rightArea.RectTransform), TextManager.Get("PumpPowered"), style: "IndicatorLightGreen") { CanBeFocused = false }; diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Power/PowerTransfer.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Power/PowerTransfer.cs index 272dfe94f..8519fd792 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Power/PowerTransfer.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Power/PowerTransfer.cs @@ -14,21 +14,19 @@ namespace Barotrauma.Items.Components { if (GuiFrame == null) return; - Point indicatorSize = new Point((int)(30 * GUI.Scale)); - var paddedFrame = new GUIFrame(new RectTransform(new Vector2(0.9f, 0.7f), GuiFrame.RectTransform, Anchor.Center), style: null); - powerIndicator = new GUITickBox(new RectTransform(indicatorSize, paddedFrame.RectTransform), + powerIndicator = new GUITickBox(new RectTransform(new Point(30, 30), paddedFrame.RectTransform), TextManager.Get("PowerTransferPowered"), style: "IndicatorLightGreen") { Enabled = false }; - highVoltageIndicator = new GUITickBox(new RectTransform(indicatorSize, paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, (int)(40 * GUI.yScale)) }, + highVoltageIndicator = new GUITickBox(new RectTransform(new Point(30, 30), paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, 40) }, TextManager.Get("PowerTransferHighVoltage"), style: "IndicatorLightRed") { ToolTip = TextManager.Get("PowerTransferTipOvervoltage"), Enabled = false }; - lowVoltageIndicator = new GUITickBox(new RectTransform(indicatorSize, paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, (int)(80 * GUI.yScale)) }, + lowVoltageIndicator = new GUITickBox(new RectTransform(new Point(30, 30), paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, 80) }, TextManager.Get("PowerTransferLowVoltage"), style: "IndicatorLightRed") { ToolTip = TextManager.Get("PowerTransferTipLowvoltage"), diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Signal/Connection.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Signal/Connection.cs index bcce5950b..8469e0bbe 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Signal/Connection.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Signal/Connection.cs @@ -57,15 +57,15 @@ namespace Barotrauma.Items.Components } } - Vector2 rightPos = new Vector2(x + width - 130 * GUI.xScale, y + 80 * GUI.yScale); - Vector2 leftPos = new Vector2(x + 130 * GUI.xScale, y + 80 * GUI.yScale); + Vector2 rightPos = new Vector2(x + width - 130, y + 80); + Vector2 leftPos = new Vector2(x + 130, y + 80); - Vector2 rightWirePos = new Vector2(x + width - 5 * GUI.xScale, y + 30 * GUI.yScale); - Vector2 leftWirePos = new Vector2(x + 5 * GUI.xScale, y + 30 * GUI.yScale); + Vector2 rightWirePos = new Vector2(x + width - 5, y + 30); + Vector2 leftWirePos = new Vector2(x + 5, y + 30); - int wireInterval = (height - (int)(20 * GUI.yScale)) / Math.Max(totalWireCount, 1); - int connectorIntervalLeft = (height - (int)(100 * GUI.yScale)) / Math.Max(panel.Connections.Count(c => c.IsOutput), 1); - int connectorIntervalRight = (height - (int)(100 * GUI.yScale)) / Math.Max(panel.Connections.Count(c => !c.IsOutput), 1); + int wireInterval = (height - 20) / Math.Max(totalWireCount, 1); + int connectorIntervalLeft = (height - 100) / Math.Max(panel.Connections.Count(c => c.IsOutput), 1); + int connectorIntervalRight = (height - 100) / Math.Max(panel.Connections.Count(c => !c.IsOutput), 1); foreach (Connection c in panel.Connections) { @@ -84,7 +84,7 @@ namespace Barotrauma.Items.Components if (c.IsOutput) { c.Draw(spriteBatch, panel, rightPos, - new Vector2(rightPos.X - GUI.SmallFont.MeasureString(c.DisplayName).X - 20 * GUI.xScale, rightPos.Y + 3 * GUI.yScale), + new Vector2(rightPos.X - GUI.SmallFont.MeasureString(c.DisplayName).X - 20, rightPos.Y + 3), rightWirePos, mouseInRect, equippedWire, wireInterval); diff --git a/Barotrauma/BarotraumaShared/SharedContent.projitems b/Barotrauma/BarotraumaShared/SharedContent.projitems index 056a77275..0ae98ed44 100644 --- a/Barotrauma/BarotraumaShared/SharedContent.projitems +++ b/Barotrauma/BarotraumaShared/SharedContent.projitems @@ -361,6 +361,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs index e94340c6e..60b6ddc79 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs @@ -146,7 +146,7 @@ namespace Barotrauma { bool isDifferentTarget = Vector2.DistanceSquared(target, currentTarget) > 1; //find a new path if one hasn't been found yet or the target is different from the current target - if (currentPath == null || Vector2.DistanceSquared(target, currentTarget) > 1.0f || findPathTimer < -1.0f) + if (currentPath == null || isDifferentTarget || findPathTimer < -1.0f) { IsPathDirty = true; @@ -163,7 +163,11 @@ namespace Barotrauma } } - currentPath = pathFinder.FindPath(pos, target, "(Character: " + character.Name + ")"); + var newPath = pathFinder.FindPath(pos, target, "(Character: " + character.Name + ")"); + if (currentPath == null || isDifferentTarget || newPath.Cost < currentPath.Cost) + { + currentPath = newPath; + } findPathTimer = Rand.Range(1.0f, 1.2f); diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveGoTo.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveGoTo.cs index c40748c6d..7fe272a64 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveGoTo.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveGoTo.cs @@ -175,7 +175,7 @@ namespace Barotrauma { if (character.CanInteractWith(item, out _, checkLinked: false)) { isCompleted = true; } } - else if (Target is Character targetCharacter) + else if (Target is Character targetCharacter && !FollowControlledCharacter) { if (character.CanInteractWith(targetCharacter, CloseEnough)) { isCompleted = true; } } diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs index 30b2449af..45adac1ec 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs @@ -230,13 +230,6 @@ namespace Barotrauma //if searching for a path inside the sub, make sure the waypoint is visible if (insideSubmarine) { - // Doesn't seem to work - //var body = Submarine.CheckVisibility(end, node.Waypoint.SimPosition); - //if (body != null && body.UserData is Structure) - //{ - // continue; - //} - var body = Submarine.PickBody(end, node.Waypoint.SimPosition, null, Physics.CollisionWall | Physics.CollisionLevel | Physics.CollisionStairs ); diff --git a/Barotrauma/BarotraumaShared/Source/GameSettings.cs b/Barotrauma/BarotraumaShared/Source/GameSettings.cs index b5a498d95..2d2f09fc2 100644 --- a/Barotrauma/BarotraumaShared/Source/GameSettings.cs +++ b/Barotrauma/BarotraumaShared/Source/GameSettings.cs @@ -415,6 +415,69 @@ namespace Barotrauma } } + #region Load DefaultConfig + private void LoadDefaultConfig(bool setLanguage = true) + { + XDocument doc = XMLExtensions.TryLoadXml(savePath); + + if (setLanguage || string.IsNullOrEmpty(Language)) + { + Language = doc.Root.GetAttributeString("language", "English"); + } + } + + public void CheckBindings(bool useDefaults) + { + foreach (InputType inputType in Enum.GetValues(typeof(InputType))) + { + var binding = keyMapping[(int)inputType]; + if (binding == null) + { + switch (inputType) + { + case InputType.Deselect: + if (useDefaults) + { + binding = new KeyOrMouse(1); + } + else + { + // Legacy support + var selectKey = keyMapping[(int)InputType.Select]; + if (selectKey != null && selectKey.Key != Keys.None) + { + binding = new KeyOrMouse(selectKey.Key); + } + } + break; + case InputType.Shoot: + if (useDefaults) + { + binding = new KeyOrMouse(0); + } + else + { + // Legacy support + var useKey = keyMapping[(int)InputType.Use]; + if (useKey != null && useKey.MouseButton.HasValue) + { + binding = new KeyOrMouse(useKey.MouseButton.Value); + } + } + break; + default: + break; + } + if (binding == null) + { + DebugConsole.ThrowError("Key binding for the input type \"" + inputType + " not set!"); + binding = new KeyOrMouse(Keys.D1); + } + keyMapping[(int)inputType] = binding; + } + } + } + #region Load DefaultConfig private void LoadDefaultConfig() { @@ -432,6 +495,16 @@ namespace Barotrauma QuickStartSubmarineName = doc.Root.GetAttributeString("quickstartsub", ""); + MasterServerUrl = doc.Root.GetAttributeString("masterserverurl", ""); + + AutoCheckUpdates = doc.Root.GetAttributeBool("autocheckupdates", true); + WasGameUpdated = doc.Root.GetAttributeBool("wasgameupdated", false); + + VerboseLogging = doc.Root.GetAttributeBool("verboselogging", false); + SaveDebugConsoleLogs = doc.Root.GetAttributeBool("savedebugconsolelogs", false); + + QuickStartSubmarineName = doc.Root.GetAttributeString("quickstartsub", ""); + if (doc == null) { GraphicsWidth = 1024; @@ -817,58 +890,6 @@ namespace Barotrauma { VoiceSetting = voiceSetting; } - foreach (ContentFile file in contentPackage.Files) - { - ToolBox.IsProperFilenameCase(file.Path); - } - } - if (!SelectedContentPackages.Any()) - { - var availablePackage = ContentPackage.List.FirstOrDefault(cp => cp.IsCompatible() && cp.CorePackage); - if (availablePackage != null) - { - SelectedContentPackages.Add(availablePackage); - } - } - - //save to get rid of the invalid selected packages in the config file - if (missingPackagePaths.Count > 0 || incompatiblePackages.Count > 0) { SaveNewPlayerConfig(); } - } - #endregion - - #region Save DefaultConfig - private void SaveNewDefaultConfig() - { - XDocument doc = new XDocument(); - - if (doc.Root == null) - { - doc.Add(new XElement("config")); - } - - doc.Root.Add( - new XAttribute("language", TextManager.Language), - new XAttribute("masterserverurl", MasterServerUrl), - new XAttribute("autocheckupdates", AutoCheckUpdates), - new XAttribute("musicvolume", musicVolume), - new XAttribute("soundvolume", soundVolume), - new XAttribute("voicechatvolume", voiceChatVolume), - new XAttribute("verboselogging", VerboseLogging), - new XAttribute("savedebugconsolelogs", SaveDebugConsoleLogs), - new XAttribute("enablesplashscreen", EnableSplashScreen), - new XAttribute("usesteammatchmaking", useSteamMatchmaking), - new XAttribute("quickstartsub", QuickStartSubmarineName), - new XAttribute("requiresteamauthentication", requireSteamAuthentication), - new XAttribute("aimassistamount", aimAssistAmount)); - - if (!ShowUserStatisticsPrompt) - { - doc.Root.Add(new XAttribute("senduserstatistics", sendUserStatistics)); - } - - if (WasGameUpdated) - { - doc.Root.Add(new XAttribute("wasgameupdated", true)); } useSteamMatchmaking = doc.Root.GetAttributeBool("usesteammatchmaking", useSteamMatchmaking); @@ -935,55 +956,6 @@ namespace Barotrauma selectedContentPackagePaths = new HashSet(); - foreach (XElement subElement in doc.Root.Elements()) - { - switch (subElement.Name.ToString().ToLowerInvariant()) - { - case "keymapping": - LoadKeyBinds(subElement); - break; - case "gameplay": - jobPreferences = new List(); - foreach (XElement ele in subElement.Element("jobpreferences").Elements("job")) - { - string jobIdentifier = ele.GetAttributeString("identifier", ""); - if (string.IsNullOrEmpty(jobIdentifier)) continue; - jobPreferences.Add(jobIdentifier); - } - break; - case "player": - defaultPlayerName = subElement.GetAttributeString("name", defaultPlayerName); - CharacterHeadIndex = subElement.GetAttributeInt("headindex", CharacterHeadIndex); - if (Enum.TryParse(subElement.GetAttributeString("gender", "none"), true, out Gender g)) - { - CharacterGender = g; - } - if (Enum.TryParse(subElement.GetAttributeString("race", "white"), true, out Race r)) - { - CharacterRace = r; - } - else - { - CharacterRace = Race.White; - } - CharacterHairIndex = subElement.GetAttributeInt("hairindex", CharacterHairIndex); - CharacterBeardIndex = subElement.GetAttributeInt("beardindex", CharacterBeardIndex); - CharacterMoustacheIndex = subElement.GetAttributeInt("moustacheindex", CharacterMoustacheIndex); - CharacterFaceAttachmentIndex = subElement.GetAttributeInt("faceattachmentindex", CharacterFaceAttachmentIndex); - break; - case "tutorials": - foreach (XElement tutorialElement in subElement.Elements()) - { - CompletedTutorialNames.Add(tutorialElement.GetAttributeString("name", "")); - } - break; - } - } - - UnsavedSettings = false; - - selectedContentPackagePaths = new HashSet(); - foreach (XElement subElement in doc.Root.Elements()) { gSettings = new XElement("graphicssettings"); diff --git a/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs b/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs index 4df1793ec..7d1dac36e 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs @@ -602,7 +602,7 @@ namespace Barotrauma if (ladderItem != null) Ladders = ladderItem.GetComponent(); } - Body pickedBody = Submarine.PickBody(SimPosition, SimPosition - Vector2.UnitY * 2.0f, null, Physics.CollisionWall | Physics.CollisionStairs); + Body pickedBody = Submarine.PickBody(SimPosition, SimPosition - Vector2.UnitY * 2.0f, null, Physics.CollisionStairs); if (pickedBody != null && pickedBody.UserData is Structure) { Structure structure = (Structure)pickedBody.UserData; diff --git a/Barotrauma/BarotraumaShared/Submarines/Bunyip.sub b/Barotrauma/BarotraumaShared/Submarines/Bunyip.sub index bcf06fa0b..3d6deb368 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Bunyip.sub and b/Barotrauma/BarotraumaShared/Submarines/Bunyip.sub differ diff --git a/Barotrauma/BarotraumaShared/Submarines/Orca.sub b/Barotrauma/BarotraumaShared/Submarines/Orca.sub index f4dd57ac0..39ebfe8e7 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Orca.sub and b/Barotrauma/BarotraumaShared/Submarines/Orca.sub differ diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index c2d283eb7..3d6fcc970 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,3 +1,18 @@ +--------------------------------------------------------------------------------------------------------- +v0.9.0.2 +--------------------------------------------------------------------------------------------------------- + +- Fixed a bug that caused frequent desync kicks when playing a multiplayer monster mission. +- Fixed an index out of range error in DoctorTutorial if proceeding too fast to the submarine. +- Fixes to missing translations and UI layout problems when using languages other than English. +- More readable font and a fix to some texts appearing slightly "clipped". +- Additions to the credits. +- Fixed bots loading only half of the target items in the contain item objective. +- Minor tweaks to subs and shuttles. +- Fixed find safety AI objective not working properly. +- Miscellaneous crew AI fixes and improvements. +- Fixed incorrect reward amount in the "Chemical shipment" description. + --------------------------------------------------------------------------------------------------------- v0.9.0.1 ---------------------------------------------------------------------------------------------------------