From 8cb95fa855d105c03c6f2902a79bd37b5d05eb8d Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 10 Feb 2024 20:18:06 +1300 Subject: [PATCH] Disable node meta override by default --- README.md | 8 +++++--- monkey_patching.lua | 2 +- settingtypes.txt | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 03f8713..26da6e5 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,11 @@ support them, however this does have some limitations: - If your mod stores `minetest.show_formspec` during load time, you'll need to add `fs51` as an optional dependency to `mod.conf` so it can use the patched show_formspec code. - - If a mod you use has broken node formspecs with fs51 enabled, try adding - `fs51.disable_meta_override = true` to minetest.conf (and please open an - issue against fs51). + - If you need to have node meta formspecs work in older clients, try adding + `fs51.disable_meta_override = false` to minetest.conf. Note that this does + not correctly parse `${key}` syntax (see https://gitlab.com/luk3yx/minetest-fs51/-/issues/1), + I recommend using `minetest.show_formspec` instead if possible as fs51 is + also able to perform backports based on the client's version. ## Dependencies diff --git a/monkey_patching.lua b/monkey_patching.lua index 005a4c1..d024a45 100644 --- a/monkey_patching.lua +++ b/monkey_patching.lua @@ -165,7 +165,7 @@ minetest.register_on_joinplayer(function(player) end end) -if minetest.settings:get_bool('fs51.disable_meta_override') then +if minetest.settings:get_bool('fs51.disable_meta_override', true) then return end diff --git a/settingtypes.txt b/settingtypes.txt index da14732..f3415ae 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -2,4 +2,4 @@ fs51.disable_monkey_patching (Prevent fs51 auto-translation) bool false # Disables node meta formspec translation. -fs51.disable_meta_override (Prevent node meta override) bool false +fs51.disable_meta_override (Prevent node meta override) bool true