Merge branch 'master' into new-netcode
Conflicts: Subsurface/Properties/AssemblyInfo.cs Subsurface/Source/Characters/AICharacter.cs Subsurface/Source/Characters/Animation/HumanoidAnimController.cs Subsurface/Source/Characters/Character.cs Subsurface/Source/GameMain.cs Subsurface/Source/Items/Components/Signal/Connection.cs Subsurface/Source/Items/Item.cs Subsurface/Source/Networking/GameServer.cs Subsurface/Source/Networking/GameServerLogin.cs Subsurface/Source/Physics/PhysicsBody.cs
This commit is contained in:
@@ -309,9 +309,8 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
cam.Position = Submarine.HiddenSubStartPosition;
|
||||
|
||||
Submarine.MainSub = new Submarine(Path.Combine(Submarine.SavePath, "Unnamed.sub"), "", false);
|
||||
cam.Position = Submarine.MainSub.Position;
|
||||
}
|
||||
|
||||
SoundPlayer.OverrideMusicType = "none";
|
||||
@@ -419,6 +418,9 @@ namespace Barotrauma
|
||||
|
||||
private void CreateSaveScreen()
|
||||
{
|
||||
if (characterMode) ToggleCharacterMode();
|
||||
if (wiringMode) ToggleWiringMode();
|
||||
|
||||
int width = 400, height = 400;
|
||||
|
||||
int y = 0;
|
||||
@@ -503,6 +505,9 @@ namespace Barotrauma
|
||||
|
||||
private bool CreateLoadScreen(GUIButton button, object obj)
|
||||
{
|
||||
if (characterMode) ToggleCharacterMode();
|
||||
if (wiringMode) ToggleWiringMode();
|
||||
|
||||
Submarine.RefreshSavedSubs();
|
||||
|
||||
int width = 300, height = 400;
|
||||
@@ -588,8 +593,7 @@ namespace Barotrauma
|
||||
Submarine.MainSub = selectedSub;
|
||||
selectedSub.Load(true);
|
||||
|
||||
//nameBox.Text = selectedSub.Name;
|
||||
//descriptionBox.Text = ToolBox.LimitString(selectedSub.Description,15);
|
||||
cam.Position = Submarine.MainSub.Position + Submarine.MainSub.HiddenSubPosition;
|
||||
|
||||
loadFrame = null;
|
||||
|
||||
@@ -598,10 +602,14 @@ namespace Barotrauma
|
||||
|
||||
private bool SelectTab(GUIButton button, object obj)
|
||||
{
|
||||
if (characterMode) ToggleCharacterMode();
|
||||
if (wiringMode) ToggleWiringMode();
|
||||
|
||||
selectedTab = (int)obj;
|
||||
|
||||
var searchBox = GUItabs[selectedTab].GetChild<GUITextBox>();
|
||||
ClearFilter(searchBox, null);
|
||||
searchBox.Text = "";
|
||||
|
||||
searchBox.AddToGUIUpdateList();
|
||||
searchBox.Select();
|
||||
@@ -901,22 +909,28 @@ namespace Barotrauma
|
||||
wiringToolPanel.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
if (loadFrame != null)
|
||||
{
|
||||
loadFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (saveFrame != null)
|
||||
{
|
||||
saveFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (selectedTab > -1)
|
||||
{
|
||||
GUItabs[selectedTab].AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
if ((characterMode || wiringMode) && dummyCharacter != null)
|
||||
{
|
||||
CharacterHUD.AddToGUIUpdateList(dummyCharacter);
|
||||
if (dummyCharacter.SelectedConstruction != null)
|
||||
{
|
||||
dummyCharacter.SelectedConstruction.AddToGUIUpdateList();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (loadFrame != null)
|
||||
{
|
||||
loadFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (saveFrame != null)
|
||||
{
|
||||
saveFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (selectedTab > -1)
|
||||
{
|
||||
GUItabs[selectedTab].AddToGUIUpdateList();
|
||||
}
|
||||
}
|
||||
|
||||
GUI.AddToGUIUpdateList();
|
||||
@@ -1064,7 +1078,7 @@ namespace Barotrauma
|
||||
graphics.Clear(new Color(0.051f, 0.149f, 0.271f, 1.0f));
|
||||
if (GameMain.DebugDraw)
|
||||
{
|
||||
GUI.DrawLine(spriteBatch, new Vector2(0.0f, -cam.WorldView.Y), new Vector2(0.0f, -(cam.WorldView.Y - cam.WorldView.Height)), Color.White*0.5f, 1.0f, (int)(2.0f/cam.Zoom));
|
||||
GUI.DrawLine(spriteBatch, new Vector2(Submarine.MainSub.HiddenSubPosition.X, -cam.WorldView.Y), new Vector2(Submarine.MainSub.HiddenSubPosition.X, -(cam.WorldView.Y - cam.WorldView.Height)), Color.White * 0.5f, 1.0f, (int)(2.0f / cam.Zoom));
|
||||
GUI.DrawLine(spriteBatch, new Vector2(cam.WorldView.X, -Submarine.MainSub.HiddenSubPosition.Y), new Vector2(cam.WorldView.Right, -Submarine.MainSub.HiddenSubPosition.Y), Color.White * 0.5f, 1.0f, (int)(2.0f / cam.Zoom));
|
||||
}
|
||||
|
||||
@@ -1084,6 +1098,11 @@ namespace Barotrauma
|
||||
|
||||
spriteBatch.Begin();
|
||||
|
||||
if (Submarine.MainSub != null)
|
||||
{
|
||||
DrawSubmarineIndicator(spriteBatch, Submarine.MainSub, Color.LightBlue * 0.5f);
|
||||
}
|
||||
|
||||
leftPanel.Draw(spriteBatch);
|
||||
topPanel.Draw(spriteBatch);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user