Added an option to respawn directly in the main sub

This commit is contained in:
juanjp600
2017-12-05 03:03:37 -03:00
parent e69e316f6b
commit c6ca3572ba
6 changed files with 121 additions and 52 deletions
@@ -47,6 +47,7 @@ namespace Barotrauma
private GUITickBox autoRestartBox;
private GUIDropDown shuttleList;
private GUITickBox shuttleTickBox;
private CampaignUI campaignUI;
@@ -77,6 +78,11 @@ namespace Barotrauma
get { return shuttleList; }
}
public GUITickBox ShuttleTickBox
{
get { return shuttleTickBox; }
}
public GUIListBox ModeList
{
get { return modeList; }
@@ -120,6 +126,12 @@ namespace Barotrauma
get { return shuttleList.SelectedData as Submarine; }
}
public bool UsingShuttle
{
get { return shuttleTickBox.Selected; }
set { shuttleTickBox.Selected = value; if (GameMain.Client != null) shuttleTickBox.Enabled = false; }
}
public GameModePreset SelectedMode
{
get { return modeList.SelectedData as GameModePreset; }
@@ -245,9 +257,15 @@ namespace Barotrauma
//respawn shuttle ------------------------------------------------------------------
new GUITextBlock(new Rectangle(columnX, 110, 20, 20), "Respawn shuttle:", "", defaultModeContainer);
shuttleTickBox = new GUITickBox(new Rectangle(columnX, 110, 20, 20), "Respawn shuttle:",Alignment.Left, defaultModeContainer);
shuttleList = new GUIDropDown(new Rectangle(columnX, 140, 200, 20), "", "", defaultModeContainer);
shuttleTickBox.Selected = true;
shuttleTickBox.OnSelected = (GUITickBox box) =>
{
shuttleList.Enabled = box.Selected;
if (GameMain.Server != null) lastUpdateID++;
return true;
};
//gamemode ------------------------------------------------------------------