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:
parent
636c069403
commit
de69273229
4 changed files with 22 additions and 21 deletions
|
@ -258,15 +258,15 @@ public:
|
|||
|
||||
void recache();
|
||||
|
||||
std::string getBaseModPath();
|
||||
const std::string& getBaseModPath() const;
|
||||
|
||||
bool isActive();
|
||||
bool isDebugMenu();
|
||||
bool hasWorldMap();
|
||||
bool isEditorBlocked();
|
||||
|
||||
std::string getPath();
|
||||
std::string getName();
|
||||
const std::string& getPath() const;
|
||||
const std::string& getName() const;
|
||||
|
||||
void shutdown();
|
||||
bool isShuttingDown();
|
||||
|
|
|
@ -82,7 +82,7 @@ bool Mod::loadModXML(TiXmlDocument *d, std::string modName)
|
|||
return d->LoadFile(baseModPath + modName + ".xml");
|
||||
}
|
||||
|
||||
std::string Mod::getBaseModPath()
|
||||
const std::string& Mod::getBaseModPath() const
|
||||
{
|
||||
refreshBaseModPath();
|
||||
|
||||
|
@ -154,12 +154,12 @@ void Mod::load(const std::string &p)
|
|||
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
|
||||
}
|
||||
|
||||
std::string Mod::getPath()
|
||||
const std::string& Mod::getPath() const
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
std::string Mod::getName()
|
||||
const std::string& Mod::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -700,16 +700,17 @@ static bool findFile_helper(const char *rawname, std::string &fname)
|
|||
return false;
|
||||
if (dsq->mod.isActive())
|
||||
{
|
||||
fname += dsq->mod.getPath();
|
||||
fname = dsq->mod.getPath();
|
||||
if(fname[fname.length() - 1] != '/')
|
||||
fname += '/';
|
||||
fname += rawname;
|
||||
fname = localisePath(fname, dsq->mod.getPath());
|
||||
fname = core->adjustFilenameCase(fname);
|
||||
if (exists(fname))
|
||||
return true;
|
||||
}
|
||||
|
||||
fname = core->adjustFilenameCase(rawname);
|
||||
fname = localisePath(rawname);
|
||||
fname = core->adjustFilenameCase(fname);
|
||||
return exists(fname);
|
||||
}
|
||||
|
||||
|
|
|
@ -535,6 +535,18 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
|
|||
|
||||
//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)
|
||||
apply();
|
||||
}
|
||||
|
@ -574,18 +586,6 @@ void UserSettings::apply()
|
|||
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue