1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 22:19:07 +00:00

Localise scripts + silene debug spam in options menu

This commit is contained in:
fgenesis 2012-07-14 15:57:21 +02:00
parent 636c069403
commit de69273229
4 changed files with 22 additions and 21 deletions

View file

@ -258,15 +258,15 @@ public:
void recache(); void recache();
std::string getBaseModPath(); const std::string& getBaseModPath() const;
bool isActive(); bool isActive();
bool isDebugMenu(); bool isDebugMenu();
bool hasWorldMap(); bool hasWorldMap();
bool isEditorBlocked(); bool isEditorBlocked();
std::string getPath(); const std::string& getPath() const;
std::string getName(); const std::string& getName() const;
void shutdown(); void shutdown();
bool isShuttingDown(); bool isShuttingDown();

View file

@ -82,7 +82,7 @@ bool Mod::loadModXML(TiXmlDocument *d, std::string modName)
return d->LoadFile(baseModPath + modName + ".xml"); return d->LoadFile(baseModPath + modName + ".xml");
} }
std::string Mod::getBaseModPath() const std::string& Mod::getBaseModPath() const
{ {
refreshBaseModPath(); refreshBaseModPath();
@ -154,12 +154,12 @@ void Mod::load(const std::string &p)
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2); particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
} }
std::string Mod::getPath() const std::string& Mod::getPath() const
{ {
return path; return path;
} }
std::string Mod::getName() const std::string& Mod::getName() const
{ {
return name; return name;
} }

View file

@ -700,16 +700,17 @@ static bool findFile_helper(const char *rawname, std::string &fname)
return false; return false;
if (dsq->mod.isActive()) if (dsq->mod.isActive())
{ {
fname += dsq->mod.getPath(); fname = dsq->mod.getPath();
if(fname[fname.length() - 1] != '/') if(fname[fname.length() - 1] != '/')
fname += '/'; fname += '/';
fname += rawname; fname += rawname;
fname = localisePath(fname, dsq->mod.getPath());
fname = core->adjustFilenameCase(fname); fname = core->adjustFilenameCase(fname);
if (exists(fname)) if (exists(fname))
return true; return true;
} }
fname = localisePath(rawname);
fname = core->adjustFilenameCase(rawname); fname = core->adjustFilenameCase(fname);
return exists(fname); return exists(fname);
} }

View file

@ -535,6 +535,18 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
//clearInputCodeMap(); //clearInputCodeMap();
if (system.locale.empty())
{
std::string loc = getSystemLocale();
debugLog("Using autodetected system locale: " + loc);
setUsedLocale(loc);
}
else
{
debugLog("Using user config locale: " + system.locale);
setUsedLocale(system.locale);
}
if (doApply) if (doApply)
apply(); apply();
} }
@ -574,18 +586,6 @@ void UserSettings::apply()
core->settings.prebufferSounds = audio.prebuffer; core->settings.prebufferSounds = audio.prebuffer;
if (system.locale.empty())
{
std::string loc = getSystemLocale();
debugLog("Using autodetected system locale: " + loc);
setUsedLocale(loc);
}
else
{
debugLog("Using user config locale: " + system.locale);
setUsedLocale(system.locale);
}
#endif #endif
} }