The content package a submarine was saved with is included in the submarine preview, added a warning when attempting to start a campaign using a sub with a mismatching content package

This commit is contained in:
Joonas Rikkonen
2018-01-25 12:19:47 +02:00
parent e55c54b161
commit 09e4687cd0
5 changed files with 51 additions and 17 deletions
@@ -411,7 +411,7 @@ namespace Barotrauma
return false;
}
}
string savePath = nameBox.Text + ".sub";
if (Submarine.MainSub != null)
{
@@ -422,6 +422,8 @@ namespace Barotrauma
savePath = Path.Combine(Submarine.SavePath, savePath);
}
Submarine.MainSub.ContentPackage = GameMain.Config.SelectedContentPackage.Name;
MemoryStream imgStream = new MemoryStream();
CreateImage(256, 128, imgStream);
@@ -525,7 +527,6 @@ namespace Barotrauma
crewSizeMin.MinValueInt = 1;
crewSizeMin.MaxValueInt = 128;
new GUITextBlock(new Rectangle(285, y, 10, 20), "-", "", Alignment.TopLeft, Alignment.Center, saveFrame);
var crewSizeMax = new GUINumberInput(new Rectangle(300, y, 50, 20), "", GUINumberInput.NumberType.Int, saveFrame);