diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 8d1b7f83a..932a2caf8 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -65,8 +65,6 @@ namespace Barotrauma } } - public List OrderOptionButtons = new List(); - #endregion #region Constructors @@ -916,12 +914,9 @@ namespace Barotrauma if (Character.Controlled == null) return false; SetCharacterOrder(character, userData as Order, option, Character.Controlled); orderTargetFrame = null; - OrderOptionButtons.Clear(); return true; } }; - - OrderOptionButtons.Add(optionButton); } } @@ -954,13 +949,9 @@ namespace Barotrauma if (Character.Controlled == null) return false; SetCharacterOrder(character, userData as Order, option, Character.Controlled); orderTargetFrame = null; - OrderOptionButtons.Clear(); return true; } }; - - OrderOptionButtons.Add(optionButton); - //lines between the order buttons if (i < order.Options.Length - 1) { diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/CaptainTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/CaptainTutorial.cs index 00ae9403c..35520cad9 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/CaptainTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/CaptainTutorial.cs @@ -148,7 +148,7 @@ namespace Barotrauma.Tutorials TriggerTutorialSegment(0); do { - yield return null; + yield return new WaitForSeconds(1.5f); GameMain.GameSession.CrewManager.HighlightOrderButton(captain_medic, "follow", highlightColor, new Vector2(5, 5)); } while (!HasOrder(captain_medic, "follow")); @@ -163,31 +163,28 @@ namespace Barotrauma.Tutorials GameMain.GameSession.CrewManager.AddCharacter(captain_mechanic); do { - yield return null; + yield return new WaitForSeconds(1.5f); GameMain.GameSession.CrewManager.HighlightOrderButton(captain_mechanic, "repairsystems", highlightColor, new Vector2(5, 5)); - HighlightOrderOption("jobspecific"); } - while (!HasOrder(captain_mechanic, "repairsystems", "jobspecific")); + while (!HasOrder(captain_mechanic, "repairsystems")); RemoveCompletedObjective(segments[1]); yield return new WaitForSeconds(2f); TriggerTutorialSegment(2); GameMain.GameSession.CrewManager.AddCharacter(captain_security); do { - yield return null; + yield return new WaitForSeconds(1.5f); GameMain.GameSession.CrewManager.HighlightOrderButton(captain_security, "operateweapons", highlightColor, new Vector2(5, 5)); - HighlightOrderOption("fireatwill"); } - while (!HasOrder(captain_security, "operateweapons", "fireatwill")); + while (!HasOrder(captain_security, "operateweapons")); RemoveCompletedObjective(segments[2]); yield return new WaitForSeconds(4f); TriggerTutorialSegment(3); GameMain.GameSession.CrewManager.AddCharacter(captain_engineer); do { - yield return null; + yield return new WaitForSeconds(1.5f); GameMain.GameSession.CrewManager.HighlightOrderButton(captain_engineer, "operatereactor", highlightColor, new Vector2(5, 5)); - HighlightOrderOption("powerup"); } while (!HasOrder(captain_engineer, "operatereactor", "powerup")); RemoveCompletedObjective(segments[3]); @@ -239,30 +236,6 @@ namespace Barotrauma.Tutorials CoroutineManager.StartCoroutine(TutorialCompleted()); } - private void HighlightOrderOption(string option) - { - if (GameMain.GameSession.CrewManager.OrderOptionButtons.Count == 0) return; - var order = GameMain.GameSession.CrewManager.OrderOptionButtons[0].UserData as Order; - - int orderIndex = 0; - for (int i = 0; i < GameMain.GameSession.CrewManager.OrderOptionButtons.Count; i++) - { - if (orderIndex >= order.Options.Length) - { - orderIndex = 0; - } - if (order.Options[orderIndex] == option) - { - if (GameMain.GameSession.CrewManager.OrderOptionButtons[i].Frame.FlashTimer <= 0) - { - GameMain.GameSession.CrewManager.OrderOptionButtons[i].Frame.Flash(highlightColor); - } - } - - orderIndex++; - } - } - private bool IsSelectedItem(Item item) { return captain?.SelectedConstruction == item; diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs index f230542a1..7cedf8fad 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/EngineerTutorial.cs @@ -272,7 +272,7 @@ namespace Barotrauma.Tutorials } yield return null; - } while (!engineer_equipmentCabinet.Inventory.IsEmpty()); // Wait until looted + } while (engineer.Inventory.FindItemByIdentifier("screwdriver") == null || engineer.Inventory.FindItemByIdentifier("redwire") == null || engineer.Inventory.FindItemByIdentifier("bluewire") == null); // Wait until looted RemoveCompletedObjective(segments[0]); SetHighlight(engineer_equipmentCabinet.Item, false); SetHighlight(engineer_reactor.Item, true); @@ -286,7 +286,6 @@ namespace Barotrauma.Tutorials { if (IsSelectedItem(engineer_reactor.Item)) { - engineer_reactor.AutoTempSlider.BarScrollValue = 1.0f; if (engineer_reactor.OnOffSwitch.FlashTimer <= 0) { engineer_reactor.OnOffSwitch.Flash(highlightColor, 1.5f, false); @@ -298,7 +297,6 @@ namespace Barotrauma.Tutorials { if (IsSelectedItem(engineer_reactor.Item) && engineer_reactor.Item.OwnInventory.slots != null) { - engineer_reactor.AutoTempSlider.BarScrollValue = 1.0f; HighlightInventorySlot(engineer.Inventory, "fuelrod", highlightColor, 0.5f, 0.5f, 0f); for (int i = 0; i < engineer_reactor.Item.OwnInventory.slots.Length; i++) @@ -313,7 +311,6 @@ namespace Barotrauma.Tutorials { if (IsSelectedItem(engineer_reactor.Item)) { - engineer_reactor.AutoTempSlider.BarScrollValue = 1.0f; if (engineer_reactor.FissionRateScrollBar.FlashTimer <= 0) { engineer_reactor.FissionRateScrollBar.Flash(highlightColor, 1.5f); @@ -339,16 +336,6 @@ namespace Barotrauma.Tutorials } yield return null; } while (!engineer_reactor.AutoTemp); - - float wait = 1.5f; - do - { - yield return new WaitForSeconds(0.1f); - wait -= 0.1f; - engineer_reactor.AutoTempSlider.BarScrollValue = 0.0f; - } while (wait > 0.0f); - engineer.SelectedConstruction = null; - engineer_reactor.CanBeSelected = false; RemoveCompletedObjective(segments[1]); SetHighlight(engineer_reactor.Item, false); SetHighlight(engineer_brokenJunctionBox, true); diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs index ec272ba98..72dca0c66 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/MechanicTutorial.cs @@ -317,14 +317,11 @@ namespace Barotrauma.Tutorials SetHighlight(mechanic_workingPump.Item, true); do { - yield return null; - if (IsSelectedItem(mechanic_brokenPump.Item)) + if (mechanic_workingPump.IsActiveSlider.FlashTimer <= 0) { - if (mechanic_workingPump.IsActiveSlider.FlashTimer <= 0) - { - mechanic_workingPump.IsActiveSlider.Flash(uiHighlightColor, 1.5f, true); - } + mechanic_workingPump.IsActiveSlider.Flash(uiHighlightColor, 1.5f, true); } + yield return null; } while (mechanic_workingPump.FlowPercentage >= 0 || !mechanic_workingPump.IsActive); // Highlight until draining SetHighlight(mechanic_workingPump.Item, false); do { yield return null; } while (mechanic_brokenhull_1.WaterPercentage > waterVolumeBeforeOpening); // Unlock door once drained @@ -513,7 +510,6 @@ namespace Barotrauma.Tutorials Repairable repairablePumpComponent = mechanic_brokenPump.Item.GetComponent(); do { - yield return null; if (!mechanic_brokenPump.Item.IsFullCondition) { if (!mechanic.HasEquippedItem("wrench")) @@ -528,6 +524,7 @@ namespace Barotrauma.Tutorials } } } + yield return null; } while (!mechanic_brokenPump.Item.IsFullCondition || mechanic_brokenPump.FlowPercentage >= 0 || !mechanic_brokenPump.IsActive); RemoveCompletedObjective(segments[9]); SetHighlight(mechanic_brokenPump.Item, false); diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/Tutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/Tutorial.cs index b4f3af7a9..22cc125a4 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/Tutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/Tutorial.cs @@ -505,31 +505,31 @@ namespace Barotrauma.Tutorials Enum.TryParse(anchorStr, out anchor); } - var background = new GUIFrame(new RectTransform(new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight), GUI.Canvas, Anchor.Center), "InnerFrame", new Color(0, 0, 0, 1f)); - - var infoBlock = new GUIFrame(new RectTransform(new Point((int)(width * GUI.Scale), (int)(height * GUI.Scale)), background.RectTransform, anchor) { AbsoluteOffset = new Point(20) }); + var infoBlock = new GUIFrame(new RectTransform(new Point((int)(width * GUI.Scale), (int)(height * GUI.Scale)), GUI.Canvas, anchor) { AbsoluteOffset = new Point(20) }); infoBlock.Flash(Color.Green); var infoContent = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.8f), infoBlock.RectTransform, Anchor.Center)) { Stretch = true, - RelativeSpacing = 0.02f + RelativeSpacing = 0.05f }; if (title.Length > 0) { - var titleBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.3f), infoContent.RectTransform), + var titleBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), title, font: GUI.VideoTitleFont, textAlignment: Alignment.Center, textColor: new Color(253, 174, 0)); titleBlock.TextScale = textScale; } - var textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 1.0f), infoContent.RectTransform), text, wrap: true); + var textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), + text, wrap: true); + textBlock.TextScale = textScale; infoBoxClosedCallback = callback; if (hasButton) { - var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.3f), infoContent.RectTransform) { MinSize = new Point(0, 30), MaxSize = new Point((int) infoContent.Rect.X, 60) }, isHorizontal: true) + var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.2f), infoContent.RectTransform) { MinSize = new Point(0, 30) }, isHorizontal: true) { Stretch = true, RelativeSpacing = 0.1f @@ -557,7 +557,7 @@ namespace Barotrauma.Tutorials GUI.PlayUISound(GUISoundType.UIMessage); - return background; + return infoBlock; } #endregion diff --git a/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs b/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs index 71b3d07d0..f32dcb58b 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs @@ -100,7 +100,6 @@ namespace Barotrauma limbSlotIcons.Add(InvSlotType.Head, new Sprite("Content/UI/IconAtlas.png", new Rectangle(896 + margin, 128 + margin, 128 - margin * 2, 128 - margin * 2))); limbSlotIcons.Add(InvSlotType.LeftHand, new Sprite("Content/UI/IconAtlas.png", new Rectangle(640 + margin, 383 + margin, 128 - margin * 2, 128 - margin * 2))); limbSlotIcons.Add(InvSlotType.RightHand, new Sprite("Content/UI/IconAtlas.png", new Rectangle(768 + margin, 383 + margin, 128 - margin * 2, 128 - margin * 2))); - limbSlotIcons.Add(InvSlotType.OuterClothes, new Sprite("Content/UI/IconAtlas.png", new Rectangle(768 + margin, 896 + margin, 128 - margin * 2, 128 - margin * 2))); } SlotPositions = new Vector2[SlotTypes.Length]; CurrentLayout = Layout.Default; diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/LightComponent.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/LightComponent.cs index 7f676175e..141433f4e 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/LightComponent.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/LightComponent.cs @@ -23,7 +23,7 @@ namespace Barotrauma.Items.Components { if (light.LightSprite != null && (item.body == null || item.body.Enabled) && lightBrightness > 0.0f) { - light.LightSprite.Draw(spriteBatch, new Vector2(item.DrawPosition.X, -item.DrawPosition.Y), lightColor * lightBrightness, 0.0f, item.Scale, SpriteEffects.None, item.SpriteDepth - 0.0001f); + light.LightSprite.Draw(spriteBatch, new Vector2(item.DrawPosition.X, -item.DrawPosition.Y), lightColor * lightBrightness, 0.0f, 1.0f, Microsoft.Xna.Framework.Graphics.SpriteEffects.None, item.SpriteDepth - 0.0001f); } } diff --git a/Barotrauma/BarotraumaShared/Data/ContentPackages/Vanilla 0.9.xml b/Barotrauma/BarotraumaShared/Data/ContentPackages/Vanilla 0.9.xml index 5d1bf37a2..c5985f21c 100644 --- a/Barotrauma/BarotraumaShared/Data/ContentPackages/Vanilla 0.9.xml +++ b/Barotrauma/BarotraumaShared/Data/ContentPackages/Vanilla 0.9.xml @@ -12,6 +12,7 @@ + diff --git a/Barotrauma/BarotraumaShared/SharedContent.projitems b/Barotrauma/BarotraumaShared/SharedContent.projitems index 80e9ad12f..4c18a5a06 100644 --- a/Barotrauma/BarotraumaShared/SharedContent.projitems +++ b/Barotrauma/BarotraumaShared/SharedContent.projitems @@ -379,6 +379,18 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -409,6 +421,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -1207,9 +1225,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest @@ -1701,15 +1716,6 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - PreserveNewest @@ -2175,19 +2181,15 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - PreserveNewest - Never + PreserveNewest + + + PreserveNewest - diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Sonar.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Sonar.cs index 144d8da1a..40e97dfe5 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Sonar.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Sonar.cs @@ -259,7 +259,7 @@ namespace Barotrauma.Items.Components int clockDir = (int)Math.Round((angle / MathHelper.TwoPi) * 12); if (clockDir == 0) clockDir = 12; - return TextManager.Get("roomname.subdiroclock").Replace("[dir]", clockDir.ToString()); + return TextManager.Get("SubDirOClock").Replace("[dir]", clockDir.ToString()); } private Vector2 GetTransducerCenter() diff --git a/Barotrauma/BarotraumaShared/Submarines/Dugong.sub b/Barotrauma/BarotraumaShared/Submarines/Dugong.sub index cd2d2b7eb..1875ad5b0 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Dugong.sub and b/Barotrauma/BarotraumaShared/Submarines/Dugong.sub differ diff --git a/Barotrauma/BarotraumaShared/Submarines/Orca.sub b/Barotrauma/BarotraumaShared/Submarines/Orca.sub index 1884e59b0..bc01cbce0 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Orca.sub and b/Barotrauma/BarotraumaShared/Submarines/Orca.sub differ diff --git a/Barotrauma/BarotraumaShared/Submarines/Typhon.sub b/Barotrauma/BarotraumaShared/Submarines/Typhon.sub index b43126315..102edb6f8 100644 Binary files a/Barotrauma/BarotraumaShared/Submarines/Typhon.sub and b/Barotrauma/BarotraumaShared/Submarines/Typhon.sub differ