Endworm & moloch immune to bleeding, showing right sub name in save file info, disable charactermode before saving, option to end round when the end of the level is reached, maintain position option in steering

This commit is contained in:
Regalis
2016-02-01 22:21:26 +02:00
parent 91a0033025
commit 14ee39e59a
20 changed files with 257 additions and 109 deletions
+7 -18
View File
@@ -25,30 +25,16 @@ namespace Barotrauma
string tempPath = Path.Combine(SaveFolder, "temp");
//if (Directory.Exists(tempPath))
//{
// Directory.Delete(tempPath, true);
//}
if (!Directory.Exists(tempPath))
{
// DecompressToDirectory(fileName, tempPath, null);
//}
//else
//{
Directory.CreateDirectory(tempPath);
}
//
//Directory.CreateDirectory(Path.GetDirectoryName(filePath) + "\\temp");
try
{
if (Submarine.Loaded!=null)
if (Submarine.Loaded != null)
{
Submarine.Loaded.SaveAs(Path.Combine(tempPath, "map.sub"));
Submarine.Loaded.SaveAs(Path.Combine(tempPath, Submarine.Loaded.Name+".sub"));
}
}
catch (Exception e)
@@ -83,8 +69,11 @@ namespace Barotrauma
DecompressToDirectory(filePath, TempPath, null);
Submarine selectedMap = new Submarine(Path.Combine(TempPath, "map.sub"), "");// Submarine.Load();
GameMain.GameSession = new GameSession(selectedMap, fileName, Path.Combine(TempPath, "gamesession.xml"));
XDocument doc = ToolBox.TryLoadXml(Path.Combine(TempPath, "gamesession.xml"));
string subPath = Path.Combine(TempPath, ToolBox.GetAttributeString(doc.Root, "submarine", ""));
Submarine selectedMap = new Submarine(subPath, "");// Submarine.Load();
GameMain.GameSession = new GameSession(selectedMap, fileName, doc);
//Directory.Delete(tempPath, true);
}
+1 -1
View File
@@ -174,7 +174,7 @@ namespace Barotrauma
string relativePath = GetRelativePath(file, currentDir);
string dirRoot = relativePath.Split(Path.DirectorySeparatorChar).First();
if (dirRoot == "Data") continue;
if (dirRoot != "Content" && dirRoot != "") continue;
if (filesToKeep.Contains(relativePath)) continue;