1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Rename "opaque_water" setting to "translucent_liquids" with inverted meaning (#14660)

The old setting will be migrated properly.

---------

Co-authored-by: grorp <gregor.parzefall@posteo.de>
This commit is contained in:
Xeno333 2024-05-22 09:46:05 -05:00 committed by GitHub
parent bd4572cfd1
commit a078cfee3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 25 additions and 8 deletions

14
src/migratesettings.h Normal file
View file

@ -0,0 +1,14 @@
// Minetest
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "settings.h"
void migrate_settings()
{
// Converts opaque_water to translucent_liquids
if (g_settings->existsLocal("opaque_water")) {
g_settings->set("translucent_liquids",
g_settings->getBool("opaque_water") ? "false" : "true");
g_settings->remove("opaque_water");
}
}