Saving times and map seeds are displayed correctly in the "load game" menu
This commit is contained in:
@@ -334,10 +334,12 @@ namespace Barotrauma
|
||||
new XElement("Gamesession"));
|
||||
|
||||
var now = DateTime.Now;
|
||||
doc.Root.Add(new XAttribute("savetime", now.Hour + ":" + now.Minute + ", " + now.ToShortDateString()));
|
||||
doc.Root.Add(new XAttribute("savetime", now.ToShortTimeString() + ", " + now.ToShortDateString()));
|
||||
|
||||
doc.Root.Add(new XAttribute("submarine", submarine==null ? "" : submarine.Name));
|
||||
|
||||
doc.Root.Add(new XAttribute("mapseed", Map.Seed));
|
||||
|
||||
((SinglePlayerMode)gameMode).Save(doc.Root);
|
||||
|
||||
try
|
||||
|
||||
@@ -417,16 +417,7 @@ namespace Barotrauma
|
||||
|
||||
string saveTime = ToolBox.GetAttributeString(doc.Root, "savetime", "unknown");
|
||||
|
||||
XElement modeElement = null;
|
||||
foreach (XElement element in doc.Root.Elements())
|
||||
{
|
||||
if (element.Name.ToString().ToLowerInvariant() != "gamemode") continue;
|
||||
|
||||
modeElement = element;
|
||||
break;
|
||||
}
|
||||
|
||||
string mapseed = ToolBox.GetAttributeString(modeElement, "mapseed", "unknown");
|
||||
string mapseed = ToolBox.GetAttributeString(doc.Root, "mapseed", "unknown");
|
||||
|
||||
GUIFrame saveFileFrame = new GUIFrame(new Rectangle((int)(saveList.Rect.Width + 20), 0, 200, 230), Color.Black*0.4f, GUI.Style, menuTabs[(int)Tab.LoadGame]);
|
||||
saveFileFrame.UserData = "savefileframe";
|
||||
|
||||
Reference in New Issue
Block a user