(c15419d90) Changelog additions + merge fix

This commit is contained in:
Joonas Rikkonen
2019-04-08 19:18:20 +03:00
parent 4811ec796f
commit 3877c18d0c
6 changed files with 34 additions and 32 deletions
@@ -1403,23 +1403,7 @@ namespace Barotrauma
private void TryDeleteSub(Submarine sub)
{
if (sub == null) { return; }
if (sub.IsVanillaSubmarine())
{
GUI.AddMessage(TextManager.Get("CannotEditVanillaSubs"), Color.Red, font: GUI.LargeFont);
return;
}
string pathToCompare = sub.FilePath.Replace(@"\", @"/").ToLowerInvariant();
foreach (ContentPackage cp in ContentPackage.List)
{
if (cp.Files.Any(f => f.Path.Replace(@"\", @"/").ToLowerInvariant() == pathToCompare))
{
new GUIMessageBox("", TextManager.Get("CannotRemoveContentPackageSub").Replace("[contentpackage]", cp.Name));
return;
}
}
if (sub == null) return;
var msgBox = new GUIMessageBox(
TextManager.Get("DeleteDialogLabel"),