diff --git a/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs b/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs index 49e4b1029..b864e3d75 100644 --- a/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs +++ b/Barotrauma/BarotraumaClient/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyDescription("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyCopyright("Copyright © Undertow Games 2017-2018")] +[assembly: AssemblyCopyright("Copyright © FakeFish 2018-2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -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.8.9.8")] -[assembly: AssemblyFileVersion("0.8.9.8")] +[assembly: AssemblyVersion("0.8.9.9")] +[assembly: AssemblyFileVersion("0.8.9.9")] diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 509675c09..a4387b521 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -61,12 +61,9 @@ namespace Barotrauma public CrewManager(XElement element, bool isSinglePlayer) : this(isSinglePlayer) { - guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent) + foreach (XElement subElement in element.Elements()) { - CanBeFocused = false - }; - - Point scrollButtonSize = new Point((int)(200 * GUI.Scale), (int)(30 * GUI.Scale)); + if (subElement.Name.ToString().ToLowerInvariant() != "character") continue; var characterInfo = new CharacterInfo(subElement); characterInfos.Add(characterInfo); @@ -77,54 +74,6 @@ namespace Barotrauma break; } } - - var reports = Order.PrefabList.FindAll(o => o.TargetAllCharacters && o.SymbolSprite != null); - reportButtonFrame = new GUILayoutGroup(new RectTransform( - new Point((HUDLayoutSettings.CrewArea.Height - (int)((reports.Count - 1) * 5 * GUI.Scale)) / reports.Count, HUDLayoutSettings.CrewArea.Height), guiFrame.RectTransform)) - { - AbsoluteSpacing = (int)(5 * GUI.Scale), - UserData = "reportbuttons", - CanBeFocused = false - }; - - //report buttons - foreach (Order order in reports) - { - if (!order.TargetAllCharacters || order.SymbolSprite == null) continue; - var btn = new GUIButton(new RectTransform(new Point(reportButtonFrame.Rect.Width), reportButtonFrame.RectTransform), style: null) - { - OnClicked = (GUIButton button, object userData) => - { - if (Character.Controlled == null || Character.Controlled.SpeechImpediment >= 100.0f) return false; - SetCharacterOrder(null, order, null, Character.Controlled); - HumanAIController.PropagateHullSafety(Character.Controlled, Character.Controlled.CurrentHull); - return true; - }, - UserData = order, - ToolTip = order.Name - }; - - new GUIFrame(new RectTransform(new Vector2(1.5f), btn.RectTransform, Anchor.Center), "OuterGlow") - { - Color = Color.Red * 0.8f, - HoverColor = Color.Red * 1.0f, - PressedColor = Color.Red * 0.6f, - UserData = "highlighted", - CanBeFocused = false, - Visible = false - }; - - var img = new GUIImage(new RectTransform(Vector2.One, btn.RectTransform), order.Prefab.SymbolSprite, scaleToFit: true) - { - Color = order.Color, - HoverColor = Color.Lerp(order.Color, Color.White, 0.5f), - ToolTip = order.Name - }; - } - - screenResolution = new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight); - - prevUIScale = GUI.Scale; } partial void InitProjectSpecific() diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs index cc9829018..f0b6652d6 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/ItemComponent.cs @@ -486,22 +486,5 @@ namespace Barotrauma.Items.Components yield return CoroutineStatus.Success; } - - partial void ParseMsg() - { - string msg = TextManager.Get(Msg, true); - if (msg != null) - { - foreach (InputType inputType in Enum.GetValues(typeof(InputType))) - { - msg = msg.Replace("[" + inputType.ToString().ToLowerInvariant() + "]", GameMain.Config.KeyBind(inputType).ToString()); - } - DisplayMsg = msg; - } - else - { - DisplayMsg = Msg; - } - } } } diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs index 479c724d4..2e5a6dd04 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs @@ -345,10 +345,6 @@ namespace Barotrauma.Items.Components crosshairPointerSprite?.Draw(spriteBatch, crosshairPointerPos, 0, zoom); } - crosshairSprite?.Draw(spriteBatch, crosshairPos, readyToFire ? Color.White : Color.White * 0.2f, 0, zoom); - crosshairPointerSprite?.Draw(spriteBatch, crosshairPointerPos, 0, zoom); - } - public void ClientRead(ServerNetObject type, NetBuffer msg, float sendingTime) { UInt16 projectileID = msg.ReadUInt16(); diff --git a/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs index 056a001a7..c80c38413 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs @@ -1104,7 +1104,7 @@ namespace Barotrauma if (!contentPacks.Contains(contentPack.Name)) contentPacks.Add(contentPack.Name); } - if (File.Exists(filePath)) + foreach (string contentPackageName in contentPacks) { var cpTickBox = new GUITickBox(new RectTransform(new Vector2(0.2f, 0.2f), contentPackList.Content.RectTransform), contentPackageName, font: GUI.SmallFont) { @@ -1123,11 +1123,6 @@ namespace Barotrauma } return true; }; - msgBox.Buttons[1].OnClicked = msgBox.Close; - } - else - { - Save(); } @@ -1168,7 +1163,6 @@ namespace Barotrauma AbsoluteSpacing = 5, Stretch = true }; -#endif new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedSaveFrame.RectTransform), TextManager.Get("SaveItemAssemblyDialogHeader"), font: GUI.LargeFont); @@ -1265,15 +1259,12 @@ namespace Barotrauma return false; } - private bool SaveAssembly(GUIButton button, object obj) + private bool CreateLoadScreen() { if (CharacterMode) SetCharacterMode(false); if (WiringMode) SetWiringMode(false); - loadFrame = new GUIButton(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker") - { - OnClicked = (btn, userdata) => { if (GUI.MouseOn == btn || GUI.MouseOn == btn.TextBlock) loadFrame = null; return true; }, - }; + Submarine.RefreshSavedSubs(); loadFrame = new GUIButton(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker") { diff --git a/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs b/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs index 8eae69a5b..99f0e154e 100644 --- a/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs +++ b/Barotrauma/BarotraumaServer/Properties/AssemblyInfo.cs @@ -9,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Undertow Games 2017-2018")] +[assembly: AssemblyCopyright("Copyright © FakeFish 2018-2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -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.8.9.8")] -[assembly: AssemblyFileVersion("0.8.9.8")] +[assembly: AssemblyVersion("0.8.9.9")] +[assembly: AssemblyFileVersion("0.8.9.9")] diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveCombat.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveCombat.cs index 40bb6e98b..6b7dda849 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveCombat.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveCombat.cs @@ -136,21 +136,6 @@ namespace Barotrauma } } } - // When defensive, try to retreat to safety. TODO: in offsensive mode, engage the target - Retreat(deltaTime); - break; - case CombatMode.Retreat: - Retreat(deltaTime); - break; - case CombatMode.Offensive: - default: - throw new System.NotImplementedException(); - } - else if (Equip(deltaTime)) - { - if (Reload(deltaTime)) - { - Attack(deltaTime); } } return weapon; diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs index 52037cb68..ca1677eac 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs @@ -538,7 +538,6 @@ namespace Barotrauma.Items.Components GameAnalyticsManager.AddErrorEventOnce("ItemComponent.DegreeOfSuccess:CharacterNull", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg); return 0.0f; } - float average = skillSuccessSum / requiredSkills.Count; float skillSuccessSum = 0.0f; for (int i = 0; i < requiredSkills.Count; i++) diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index a9d783885..c255258ca 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -14,6 +14,7 @@ possible for modders to add new craftable items without having to modify the fab - Camera movement is disabled completely when an item interface is open (not just when the cursor is on the interface). - Option to disable the camera pan/zoom effects from the game settings. +- Option to set a custom preview image for subs. - Allow aiming on ladders when not moving. - Characters play Entrance of the Gladiators on the guitar when wearing a clown mask. - Display a warning on the status monitor when docked to an outpost ("Docked to X, undock before attempting