Item.Container bugfix (affected at least railguns in MP), merged the "your crew has died" message box with shiftsummary, reliable reactor syncing, prevent artifacts dropping out of the level

This commit is contained in:
Regalis
2016-01-12 01:02:05 +02:00
parent 64e62545a5
commit 5513637fe5
21 changed files with 132 additions and 89 deletions

View File

@@ -204,15 +204,39 @@ namespace Barotrauma
}
else
{
var msgBox = new GUIMessageBox("Game over", "Your entire crew has died!", new string[] { "Load game", "Quit" });
msgBox.Buttons[0].OnClicked += GameMain.GameSession.LoadPrevious;
msgBox.Buttons[0].OnClicked += msgBox.Close;
msgBox.Buttons[1].OnClicked = GameMain.LobbyScreen.QuitToMainMenu;
msgBox.Buttons[1].OnClicked += msgBox.Close;
// var okButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Ok", Alignment.BottomRight, GUI.Style, summaryFrame.children[0]);
//okButton.OnClicked = (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Dequeue(); return true; };
// var msgBox = new GUIMessageBox("Game over", "Your entire crew has died!", new string[] { "Load game", "Quit" });
// msgBox.Buttons[0].OnClicked += GameMain.GameSession.LoadPrevious;
// msgBox.Buttons[0].OnClicked += msgBox.Close;
// msgBox.Buttons[1].OnClicked = GameMain.LobbyScreen.QuitToMainMenu;
// msgBox.Buttons[1].OnClicked += msgBox.Close;
}
GameMain.GameSession.EndShift("");
if (!success)
{
var summaryScreen = GUIMessageBox.MessageBoxes.Peek();
if (summaryScreen != null)
{
summaryScreen = summaryScreen.children[0];
summaryScreen.RemoveChild(summaryScreen.children.Find(c => c is GUIButton));
var okButton = new GUIButton(new Rectangle(-120, 0, 100, 30), "Load game", Alignment.BottomRight, GUI.Style, summaryScreen);
okButton.OnClicked += GameMain.GameSession.LoadPrevious;
okButton.OnClicked += (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Dequeue(); return true; };
var quitButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Quit", Alignment.BottomRight, GUI.Style, summaryScreen);
quitButton.OnClicked += GameMain.LobbyScreen.QuitToMainMenu;
quitButton.OnClicked += (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Dequeue(); return true; };
}
}
CrewManager.EndShift();
for (int i = Character.CharacterList.Count - 1; i >= 0; i--)
{

View File

@@ -95,7 +95,7 @@ namespace Barotrauma
int x = 0;
foreach (Character character in gameSession.CrewManager.characters)
{
var characterFrame = new GUIFrame(new Rectangle(x, y, 170, 70), character.IsDead ? Color.DarkRed * 0.7f : Color.Transparent, GUI.Style, listBox);
var characterFrame = new GUIFrame(new Rectangle(x, y, 170, 70), Color.Transparent, GUI.Style, listBox);
characterFrame.OutlineColor = Color.Transparent;
characterFrame.Padding = new Vector4(5.0f, 5.0f, 5.0f, 5.0f);
characterFrame.CanBeFocused = false;