mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Mainmenu game-related changes (#11887)
fixes: * Switching between games does not immediately hide creative mode / damage buttons if so specified * World creation menu has a game selection list even though the menu already provides a gamebar * Showing gameid in world list is unnecessary * Choice of mapgen parameters in menu persists between games (and was half-broken)
This commit is contained in:
parent
b164e16d1b
commit
4c8c649779
9 changed files with 262 additions and 210 deletions
|
@ -659,9 +659,7 @@ bool Settings::getNoiseParamsFromGroup(const std::string &name,
|
|||
|
||||
bool Settings::exists(const std::string &name) const
|
||||
{
|
||||
MutexAutoLock lock(m_mutex);
|
||||
|
||||
if (m_settings.find(name) != m_settings.end())
|
||||
if (existsLocal(name))
|
||||
return true;
|
||||
if (auto parent = getParent())
|
||||
return parent->exists(name);
|
||||
|
@ -669,6 +667,14 @@ bool Settings::exists(const std::string &name) const
|
|||
}
|
||||
|
||||
|
||||
bool Settings::existsLocal(const std::string &name) const
|
||||
{
|
||||
MutexAutoLock lock(m_mutex);
|
||||
|
||||
return m_settings.find(name) != m_settings.end();
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> Settings::getNames() const
|
||||
{
|
||||
MutexAutoLock lock(m_mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue