diff --git a/Subsurface/Source/DebugConsole.cs b/Subsurface/Source/DebugConsole.cs index 3b5477908..16b0b63f7 100644 --- a/Subsurface/Source/DebugConsole.cs +++ b/Subsurface/Source/DebugConsole.cs @@ -270,6 +270,7 @@ namespace Subsurface Game1.LobbyScreen.Select(); break; case "savemap": + case "savesub": if (commands.Length < 2) break; string fileName = string.Join(" ", commands.Skip(1)); @@ -282,6 +283,7 @@ namespace Subsurface NewMessage("map saved", Color.Green); break; case "loadmap": + case "loadsub": if (commands.Length < 2) break; Submarine.Load("Content/SavedMaps/" + string.Join(" ", commands.Skip(1))); break; diff --git a/Subsurface/Source/Items/Components/Machines/Radar.cs b/Subsurface/Source/Items/Components/Machines/Radar.cs index 3b31c1d74..95bf0f84c 100644 --- a/Subsurface/Source/Items/Components/Machines/Radar.cs +++ b/Subsurface/Source/Items/Components/Machines/Radar.cs @@ -111,6 +111,9 @@ namespace Subsurface.Items.Components for (int i = 0; i < edges.Count; i++) { + if ((edges[i][0] * displayScale).Length() > radius) continue; + if ((edges[i][1] * displayScale).Length() > radius) continue; + GUI.DrawLine(spriteBatch, center + (edges[i][0] - offset) * displayScale, center + (edges[i][1] - offset) * displayScale, Color.White); @@ -132,15 +135,14 @@ namespace Subsurface.Items.Components if (c.AnimController.CurrentHull != null) continue; Vector2 pos = c.Position * displayScale; - if (c.SimPosition != Vector2.Zero && pos.Length() < radius) - { - int width = (int)MathHelper.Clamp(c.Mass / 20, 1, 10); + if (c.SimPosition == Vector2.Zero || pos.Length() > radius) continue; + + int width = (int)MathHelper.Clamp(c.Mass / 20, 1, 10); - pos.Y = -pos.Y; - pos += center; + pos.Y = -pos.Y; + pos += center; - GUI.DrawRectangle(spriteBatch, new Rectangle((int)pos.X - width / 2, (int)pos.Y - width / 2, width, width), Color.White, true); - } + GUI.DrawRectangle(spriteBatch, new Rectangle((int)pos.X - width / 2, (int)pos.Y - width / 2, width, width), Color.White, true); } if (screenOverlay!=null) diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 6b42a2203..87368807b 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -635,11 +635,12 @@ namespace Subsurface } } - editingHUD = new GUIFrame(new Rectangle(x, y, width, 110 + (editableProperties.Count() + requiredItemCount) * 30), Color.Black * 0.5f); + editingHUD = new GUIFrame(new Rectangle(x, y, width, 110 + (editableProperties.Count() + requiredItemCount) * 30), GUI.style); editingHUD.Padding = new Vector4(10, 10, 0, 0); editingHUD.UserData = this; - new GUITextBlock(new Rectangle(0, 0, 100, 20), prefab.Name, GUI.style, editingHUD); + new GUITextBlock(new Rectangle(0, 0, 100, 20), prefab.Name, GUI.style, + Alignment.TopLeft, Alignment.TopLeft, editingHUD, false, GUI.LargeFont); y += 20; @@ -647,7 +648,8 @@ namespace Subsurface { if (prefab.IsLinkable) { - new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another construction", GUI.style, editingHUD); + new GUITextBlock(new Rectangle(0, 0, 0, 20), "Hold space to link to another item", + GUI.style, Alignment.TopLeft, Alignment.TopRight, editingHUD); y += 25; } foreach (ItemComponent ic in components) diff --git a/Subsurface/Source/Screens/MainMenu.cs b/Subsurface/Source/Screens/MainMenu.cs index 018be373c..75b258052 100644 --- a/Subsurface/Source/Screens/MainMenu.cs +++ b/Subsurface/Source/Screens/MainMenu.cs @@ -37,18 +37,16 @@ namespace Subsurface menuTabs[(int)Tabs.Main] = new GUIFrame(panelRect, GUI.style); //menuTabs[(int)Tabs.Main].Padding = GUI.style.smallPadding; - //GUIButton button = new GUIButton(new Rectangle(0, 0, 0, 30), "Tutorial", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); - //button.OnClicked = TutorialButtonClicked; + GUIButton button = new GUIButton(new Rectangle(0, 0, 0, 30), "Tutorial", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); + button.OnClicked = TutorialButtonClicked; - GUIButton button = new GUIButton(new Rectangle(0, 70, 0, 30), "New Game", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); + button = new GUIButton(new Rectangle(0, 70, 0, 30), "New Game", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); button.UserData = (int)Tabs.NewGame; button.OnClicked = SelectTab; - //button.Enabled = false; button = new GUIButton(new Rectangle(0, 130, 0, 30), "Load Game", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); button.UserData = (int)Tabs.LoadGame; button.OnClicked = SelectTab; - //button.Enabled = false; button = new GUIButton(new Rectangle(0, 200, 0, 30), "Join Server", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); //button.UserData = (int)Tabs.JoinServer; @@ -57,7 +55,6 @@ namespace Subsurface button = new GUIButton(new Rectangle(0, 260, 0, 30), "Host Server", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); button.UserData = (int)Tabs.HostServer; button.OnClicked = SelectTab; - //button.Enabled = false; button = new GUIButton(new Rectangle(0, 330, 0, 30), "Quit", Alignment.CenterX, GUI.style, menuTabs[(int)Tabs.Main]); button.OnClicked = QuitClicked; diff --git a/Subsurface_Solution.sln b/Subsurface_Solution.sln index 9d5b8a22c..e773231d9 100644 --- a/Subsurface_Solution.sln +++ b/Subsurface_Solution.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subsurface", "Subsurface\Subsurface.csproj", "{008C0F83-E914-4966-9135-EA885059EDD8}" EndProject @@ -307,7 +307,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal diff --git a/Subsurface_Solution.v12.suo b/Subsurface_Solution.v12.suo index 12965c30d..04b014ea1 100644 Binary files a/Subsurface_Solution.v12.suo and b/Subsurface_Solution.v12.suo differ