Fix crash when a removed map unlock condition is loaded from a save file and saving to a save file. Move world rendering into each individual state draw method to prevent dividing by zero for invalid maps being loaded in. Loaded up new Overworld song. Added extra flower indicator under the bridge of 1-1. Fix 1-5 tree tiles. Make current map name / level name functinos return the proper story level name if we are in a story level to avoid programmer confusion / provide more flexible functions. Both Blacksmith story and chapter 1 bonus boss remove the visited flag from the camp, notifying the player visually on the world map that they need to revisit it. Move Blacksmith Tutorial trigger from requiring you to visit the camp via the world map to when you enter the camp regardless if you did it from completing a level or doing it from the world map. Release Build 8187.
This commit is contained in:
@@ -112,17 +112,15 @@ const void SaveFile::SaveGame(){
|
||||
saveFile["Player"]["Base Stats"][std::string(attr.ActualName())].SetReal(val);
|
||||
}
|
||||
for(const std::string&unlockName:Unlock::unlocks){
|
||||
saveFile["Unlocks"][unlockName].SetString("True");
|
||||
if(unlockName=="WORLD_MAP")continue; //This is a special exception, because the world map is not an actual stage.
|
||||
saveFile["Unlocks"][unlockName].SetString("True");
|
||||
|
||||
auto opt_cp=State_OverworldMap::ConnectionPointFromString(unlockName);
|
||||
if(!opt_cp.has_value()){ERR(std::format("WARNING! Could not find connection point {}! THIS SHOULD NOT BE HAPPENING! Potential invalid unlock name.",unlockName));
|
||||
if(!opt_cp.has_value())continue; //Harmless, we probably just deleted the map.
|
||||
if(opt_cp.value()->Visited()){
|
||||
saveFile["Unlocks"][unlockName].SetString("True",1U);
|
||||
}else{
|
||||
if(opt_cp.value()->Visited()){
|
||||
saveFile["Unlocks"][unlockName].SetString("True",1U);
|
||||
}else{
|
||||
saveFile["Unlocks"][unlockName].SetString("False",1U);
|
||||
}
|
||||
saveFile["Unlocks"][unlockName].SetString("False",1U);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +318,7 @@ void SaveFile::LoadFile(){
|
||||
Unlock::UnlockArea(key);
|
||||
if(data.GetValueCount()>1&&data.GetBool(1U)){
|
||||
auto opt_cp=State_OverworldMap::ConnectionPointFromString(key);
|
||||
if(!opt_cp)ERR(std::format("WARNING! Could not find connection point {}! THIS SHOULD NOT BE HAPPENING! Potential invalid unlock name.",key))
|
||||
if(!opt_cp)continue; //Harmless, it just means the connection point used to exist and doesn't anymore.
|
||||
else opt_cp.value()->SetVisited();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user