-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't write load_mod_ = false entries to world.mt #11423
Comments
There's actually a related problem also: If you delete a mod that was disabled, the world won't start anymore until you remove the "= false" line from world.mt. |
One more potential nuisance: I know some people who rely on the engine pre-filling world.mt with EDIT: could a possible solution be to only write the entries when the world.mt is created for the first time (world creation) then never update it anymore? Personally, I'd love to see this implemented though! |
Huh? I can't get MT to care about disabled entries, if you meant enabled ones the world will still start up but throw an error: |
Related codes: https://github.com/minetest/minetest/blob/cec0dfcbbda1e11e5ff2f45e58ea393d0437d7c6/src/content/mods.cpp#L307-L310 diff --git a/src/content/mods.cpp b/src/content/mods.cpp
index 434004b29..22127d242 100644
--- a/src/content/mods.cpp
+++ b/src/content/mods.cpp
@@ -306,8 +306,6 @@ void ModConfiguration::addModsFromConfig(
const ModSpec &mod = *it;
if (load_mod_names.count(mod.name) != 0)
addon_mods.push_back(mod);
- else
- conf.setBool("load_mod_" + mod.name, false);
}
}
conf.updateConfigFile(settings_path.c_str()); |
He means:
|
If we had a good MT cli for server management, this wouldn't really be needed |
I will add that not just valid mods end up in this list. Every folder name that isn't a mod ends up in the list. Even empty folders. And it clutters the file badly: #12691 didn't even notice he had player_backend twice in his world.mt file which caused him issues.
|
Are you implying it's a privacy issue? I doubt most would agree. |
Montandalar who made this issue said so and he only thought of mod name fingerprints. Just scroll to the top of the page and read it again. I share his opinion. I often move stuff there during development that aren't real mods. I wouldn't have guessed all those folder names get shoved into every world.mt of every world I load up. If I shared those, they'd see my entire .minetest/mods folder. |
Problem
Whenever you configure the mods on a world, the serialiser for world.mt goes and writes load_mod_* = true/false for all mods in your entire mod directory. This adds a lot of noise to the world.mt as all of the false entries are not really useful at all. In fact, for anyone with a decent mod collection, if their mods didn't change often, then the list of mods could probably be used to fingerprint who made a particular world.mt - as silly of a privacy concern as that may sound..
Solution
When serialising world.mt, ignore any mods that are disabled and don't write any entry to world.mt at all for them.
The text was updated successfully, but these errors were encountered: