diff --git a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs index a7b05fc0f..34de3d244 100644 --- a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs +++ b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs @@ -36,6 +36,16 @@ 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 b453de6ed..365a9a2a9 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 8032483c3..6cc78431d 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.Aim), GameMain.Config.KeyBind(InputType.Shoot)); // Welding objective + TriggerTutorialSegment(2, GameMain.Config.KeyBind(InputType.Shoot), GameMain.Config.KeyBind(InputType.Aim)); // Welding objective do { if (!mechanic.HasEquippedItem("divingmask")) @@ -334,13 +334,14 @@ 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 b96b2f9c5..94e25720b 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(setLanguage: false); + LoadDefaultConfig(); 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 e7431cb8b..6c7404f03 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Engine.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Engine.cs @@ -36,7 +36,9 @@ namespace Barotrauma.Items.Components RelativeSpacing = 0.05f }; - powerIndicator = new GUITickBox(new RectTransform(new Point(30, 30), content.RectTransform), + int indicatorSize = (int)(30 * GUI.Scale); + + powerIndicator = new GUITickBox(new RectTransform(new Point(indicatorSize, indicatorSize), 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 9ad58876d..9b6cf355e 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, 30), itemList.Content.RectTransform), style: null) + GUIFrame frame = new GUIFrame(new RectTransform(new Point(itemList.Rect.Width, (int)(30 * GUI.yScale)), 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(50, 0) }, + GUITextBlock textBlock = new GUITextBlock(new RectTransform(Vector2.Zero, frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point((int)(50 * GUI.xScale), 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(30, 30), frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point(3, 0) }, + GUIImage img = new GUIImage(new RectTransform(new Point((int)(30 * GUI.Scale)), frame.RectTransform, Anchor.CenterLeft) { AbsoluteOffset = new Point((int)(3 * GUI.xScale), 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 81caad11f..467bbbb77 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; + textPos.X -= ((textPos.X + textSize.X / 2) - submarineContainer.Rect.Right) + 10 * GUI.xScale; if (textPos.X - textSize.X / 2 < submarineContainer.Rect.X) - textPos.X += (submarineContainer.Rect.X - (textPos.X - textSize.X / 2)) + 10; + textPos.X += (submarineContainer.Rect.X - (textPos.X - textSize.X / 2)) + 10 * GUI.xScale; 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: 10); + GUI.DrawLine(spriteBatch, center + start, center + end, Color.DarkCyan * Rand.Range(0.3f, 0.35f), width: (int)(10 * GUI.Scale)); } } diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Pump.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Machines/Pump.cs index ab54744a6..55caa8d4b 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(50, 100), paddedFrame.RectTransform, Anchor.CenterLeft), + isActiveSlider = new GUIScrollBar(new RectTransform(new Point((int)(50 * GUI.Scale), (int)(100 * GUI.Scale)), 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(84, sliderHandle.Rect.Height); + sliderHandle.RectTransform.NonScaledSize = new Point((int)(84 * GUI.Scale), 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(30, 30), rightArea.RectTransform), TextManager.Get("PumpPowered"), style: "IndicatorLightGreen") + powerIndicator = new GUITickBox(new RectTransform(new Point((int)(30 * GUI.Scale)), 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 8519fd792..272dfe94f 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Power/PowerTransfer.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Power/PowerTransfer.cs @@ -14,19 +14,21 @@ 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(new Point(30, 30), paddedFrame.RectTransform), + powerIndicator = new GUITickBox(new RectTransform(indicatorSize, paddedFrame.RectTransform), TextManager.Get("PowerTransferPowered"), style: "IndicatorLightGreen") { Enabled = false }; - highVoltageIndicator = new GUITickBox(new RectTransform(new Point(30, 30), paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, 40) }, + highVoltageIndicator = new GUITickBox(new RectTransform(indicatorSize, paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, (int)(40 * GUI.yScale)) }, TextManager.Get("PowerTransferHighVoltage"), style: "IndicatorLightRed") { ToolTip = TextManager.Get("PowerTransferTipOvervoltage"), Enabled = false }; - lowVoltageIndicator = new GUITickBox(new RectTransform(new Point(30, 30), paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, 80) }, + lowVoltageIndicator = new GUITickBox(new RectTransform(indicatorSize, paddedFrame.RectTransform) { AbsoluteOffset = new Point(0, (int)(80 * GUI.yScale)) }, 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 a7bd1a862..bcce5950b 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, y + 80); - Vector2 leftPos = new Vector2(x + 130, y + 80); + 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 rightWirePos = new Vector2(x + width - 5, y + 30); - Vector2 leftWirePos = new Vector2(x + 5, y + 30); + 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); - 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); + 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); 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, rightPos.Y + 3), + new Vector2(rightPos.X - GUI.SmallFont.MeasureString(c.DisplayName).X - 20 * GUI.xScale, rightPos.Y + 3 * GUI.yScale), rightWirePos, mouseInRect, equippedWire, wireInterval); @@ -95,7 +95,7 @@ namespace Barotrauma.Items.Components else { c.Draw(spriteBatch, panel, leftPos, - new Vector2(leftPos.X + 20, leftPos.Y - 12), + new Vector2(leftPos.X + 20 * GUI.xScale, leftPos.Y - 12 * GUI.yScale), leftWirePos, mouseInRect, equippedWire, wireInterval); diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs index 0185dec0c..03adc3207 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs @@ -317,7 +317,7 @@ namespace Barotrauma.Items.Components if (ShowProjectileIndicator) { - Point slotSize = new Point(60, 30); + Point slotSize = new Point((int)(60 * GUI.Scale), (int)(30 * GUI.Scale)); int spacing = 5; int slotsPerRow = Math.Min(availableAmmo.Count, 6); int totalWidth = slotSize.X * slotsPerRow + spacing * (slotsPerRow - 1); diff --git a/Barotrauma/BarotraumaShared/SharedContent.projitems b/Barotrauma/BarotraumaShared/SharedContent.projitems index 0ae98ed44..056a77275 100644 --- a/Barotrauma/BarotraumaShared/SharedContent.projitems +++ b/Barotrauma/BarotraumaShared/SharedContent.projitems @@ -361,9 +361,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs index 60b6ddc79..e94340c6e 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 || isDifferentTarget || findPathTimer < -1.0f) + if (currentPath == null || Vector2.DistanceSquared(target, currentTarget) > 1.0f || findPathTimer < -1.0f) { IsPathDirty = true; @@ -163,11 +163,7 @@ namespace Barotrauma } } - var newPath = pathFinder.FindPath(pos, target, "(Character: " + character.Name + ")"); - if (currentPath == null || isDifferentTarget || newPath.Cost < currentPath.Cost) - { - currentPath = newPath; - } + currentPath = pathFinder.FindPath(pos, target, "(Character: " + character.Name + ")"); 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 7fe272a64..c40748c6d 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 && !FollowControlledCharacter) + else if (Target is Character targetCharacter) { 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 45adac1ec..30b2449af 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs @@ -230,6 +230,13 @@ 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 34f3f0e0a..b5a498d95 100644 --- a/Barotrauma/BarotraumaShared/Source/GameSettings.cs +++ b/Barotrauma/BarotraumaShared/Source/GameSettings.cs @@ -415,17 +415,6 @@ 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"); - } - } - #region Load DefaultConfig private void LoadDefaultConfig() { @@ -443,26 +432,6 @@ 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", ""); - - 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; @@ -848,6 +817,58 @@ 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); diff --git a/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs b/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs index 7d1dac36e..4df1793ec 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.CollisionStairs); + Body pickedBody = Submarine.PickBody(SimPosition, SimPosition - Vector2.UnitY * 2.0f, null, Physics.CollisionWall | Physics.CollisionStairs); if (pickedBody != null && pickedBody.UserData is Structure) { Structure structure = (Structure)pickedBody.UserData; diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index 3d6fcc970..c2d283eb7 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,18 +1,3 @@ ---------------------------------------------------------------------------------------------------------- -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 ---------------------------------------------------------------------------------------------------------