1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 14:09:06 +00:00

Load a mod's elementeffects.txt if provided

This commit is contained in:
fgenesis 2012-09-02 02:29:33 +02:00
parent 5d41c93c5b
commit f97fe12462

View file

@ -300,7 +300,18 @@ void DSQ::newGame()
void DSQ::loadElementEffects()
{
std::ifstream inFile("data/elementeffects.txt");
bool found = false;
std::string fn;
if (dsq->mod.isActive())
{
fn = dsq->mod.getPath() + "elementeffects.txt";
if(exists(fn))
found = true;
}
if(!found)
fn = "data/elementeffects.txt";
InStream inFile(fn.c_str());
elementEffects.clear();
std::string line;
while (std::getline(inFile, line))