1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

Fix loading stringbank.txt form a mod when loading a saved game, and load treasures.txt from mods if it exists.

This commit is contained in:
fgenesis 2012-07-13 16:10:07 +02:00
parent aeb96ca2dd
commit 8084a4c613

View file

@ -871,10 +871,21 @@ void Continuity::loadTreasureData()
{
treasureData.clear();
std::string line, gfx;
std::string line, gfx, file;
int num, use;
float sz;
InStream in2("data/treasures.txt");
bool found = false;
if (dsq->mod.isActive())
{
file = dsq->mod.getPath() + "treasures.txt";
if(exists(file))
found = true;
}
if(!found)
file = "data/treasures.txt";
InStream in2(file.c_str());
while (std::getline(in2, line))
{
std::istringstream is(line);
@ -2910,6 +2921,8 @@ void Continuity::loadFile(int slot)
// Possibly mod-specific data the the continuity reset didn't catch
loadSongBank();
this->worldMap.load();
loadTreasureData();
stringBank.load();
}
void Continuity::setNaijaModel(std::string model)