Fire extinguisher, burnt limbs, spectating improvements, option to disable spectating, jumpsuits for engi & mech, fireproof items, stuff

This commit is contained in:
Regalis
2015-11-18 20:02:45 +02:00
parent 7b6d92bb27
commit 9b08201972
36 changed files with 429 additions and 85 deletions
@@ -34,6 +34,8 @@ namespace Barotrauma.Networking
private bool autoRestart;
private bool allowSpectating = true;
public bool AutoRestart
{
get { return (ConnectedClients.Count == 0) ? false : autoRestart; }
@@ -65,6 +67,11 @@ namespace Barotrauma.Networking
get { return banList; }
}
public bool AllowSpectating
{
get { return allowSpectating; }
}
private void CreateSettingsFrame()
{
settingsFrame = new GUIFrame(new Rectangle(0,0,GameMain.GraphicsWidth,GameMain.GraphicsHeight), Color.Black*0.5f);
@@ -94,6 +101,13 @@ namespace Barotrauma.Networking
selectionTick.UserData = (SelectionMode)i;
}
var allowSpecBox = new GUITickBox(new Rectangle(0, 0, 20, 20), "Allow spectating", Alignment.Left, innerFrame);
allowSpecBox.Selected = true;
allowSpecBox.OnSelected = ToggleAllowSpectating;
var closeButton = new GUIButton(new Rectangle(0, 0, 100, 20), "Close", Alignment.BottomRight, GUI.Style, innerFrame);
closeButton.OnClicked = ToggleSettingsFrame;
}
@@ -144,6 +158,12 @@ namespace Barotrauma.Networking
return true;
}
private bool ToggleAllowSpectating(GUITickBox tickBox)
{
allowSpectating = tickBox.Selected;
return true;
}
public bool ToggleSettingsFrame(GUIButton button, object obj)
{
if (settingsFrame==null)