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:
parent
5d41c93c5b
commit
f97fe12462
1 changed files with 12 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue