mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Support game-specific minetest.conf
This commit is contained in:
parent
adc52f3f3c
commit
c2250d95c4
6 changed files with 30 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue