mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Support game-specific minetest.conf
This commit is contained in:
@@ -243,3 +243,12 @@ void set_default_settings(Settings *settings)
|
||||
|
||||
}
|
||||
|
||||
void override_default_settings(Settings *settings, Settings *from)
|
||||
{
|
||||
std::vector<std::string> names = from->getNames();
|
||||
for(size_t i=0; i<names.size(); i++){
|
||||
const std::string &name = names[i];
|
||||
settings->setDefault(name, from->get(name));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user