Commits

Ilkka Halila committed 5317287

Reset order problems ugh

Comments (0)

Files changed (1)

Goblin Camp/src/Game.cpp

 }
 
 void Game::Reset() {
+	//TODO: ugly
+	instance->npcList.clear();
+	instance->natureList.clear(); //Ice decays into ice objects and water, so clear this before items and water
+	instance->itemList.clear(); //Destroy current items, that way ~Construction() won't have items to try and stockpile
+	instance->staticConstructionList.clear();
+	instance->dynamicConstructionList.clear();
+
 	Map::Reset();
 	JobManager::Reset();
 	StockManager::Reset();
 
 	UI::Reset();
 
-	//TODO: ugly
-	instance->itemList.clear(); //Destroy current items, that way ~Construction() won't have items to try and stockpile
-	instance->staticConstructionList.clear();
-	instance->dynamicConstructionList.clear();
-	instance->npcList.clear();
-	instance->natureList.clear(); //Ice decays into ice objects and water, so clear this before items and water
-	instance->itemList.clear(); //Items may create water, so destroy this before water
-
 	delete instance;
 	instance = 0;
 }