mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-11 00:29:53 +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()
|
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();
|
elementEffects.clear();
|
||||||
std::string line;
|
std::string line;
|
||||||
while (std::getline(inFile, line))
|
while (std::getline(inFile, line))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue