Skip to content

Commit 896e8db

Browse files
committed
Revert "Fixed scene name being missing from save"
This reverts commit 3592df1.
1 parent 6b8ca1d commit 896e8db

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Source/Managers/ActivityMan.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ bool ActivityMan::SaveCurrentGame(const std::string& fileName) {
124124
}
125125
}
126126

127+
writer->NewPropertyWithValue("MaxUniqueID", currentMaxID);
128+
writer->NewPropertyWithValue("CurrentSimTicks", g_TimerMan.GetSimTickCount());
127129
writer->NewPropertyWithValue("OriginalScenePresetName", scene->GetPresetName());
128130
writer->NewPropertyWithValue("PlaceObjectsIfSceneIsRestarted", g_SceneMan.GetPlaceObjectsOnLoad());
129131
writer->NewPropertyWithValue("PlaceUnitsIfSceneIsRestarted", g_SceneMan.GetPlaceUnitsOnLoad());
130132
writer->NewPropertyWithValue("Scene", modifiableScene.get());
131-
writer->NewPropertyWithValue("MaxUniqueID", currentMaxID);
132-
writer->NewPropertyWithValue("CurrentSimTicks", g_TimerMan.GetSimTickCount());
133133

134134
auto saveWriterData = [](Writer* writerToSave) {
135135
writerToSave->EndWrite();
@@ -172,6 +172,11 @@ bool ActivityMan::LoadAndLaunchGame(const std::string& fileName) {
172172
std::string propName = reader.ReadPropName();
173173
if (propName == "Activity") {
174174
reader >> activity.get();
175+
} else if (propName == "MaxUniqueID") {
176+
reader >> maxUniqueID;
177+
g_MovableMan.SetShouldPersistUniqueIDs(true);
178+
} else if (propName == "CurrentSimTicks") {
179+
reader >> simTimeTicks;
175180
} else if (propName == "OriginalScenePresetName") {
176181
reader >> originalScenePresetName;
177182
} else if (propName == "PlaceObjectsIfSceneIsRestarted") {
@@ -180,11 +185,6 @@ bool ActivityMan::LoadAndLaunchGame(const std::string& fileName) {
180185
reader >> placeUnitsIfSceneIsRestarted;
181186
} else if (propName == "Scene") {
182187
reader >> scene.get();
183-
} else if (propName == "MaxUniqueID") {
184-
reader >> maxUniqueID;
185-
g_MovableMan.SetShouldPersistUniqueIDs(true);
186-
} else if (propName == "CurrentSimTicks") {
187-
reader >> simTimeTicks;
188188
}
189189
}
190190

Source/Menus/SaveLoadMenuGUI.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ void SaveLoadMenuGUI::PopulateSaveGamesList() {
102102

103103
std::string originalScenePresetName;
104104
while (reader.NextProperty()) {
105-
// This is a bit unsafe because it skips properties, but meh, doesn't matter as long as Activity and OriginalScenePresetName are first
106105
std::string propName = reader.ReadPropName();
107106
if (propName == "Activity") {
108107
reader >> activity;

0 commit comments

Comments
 (0)