Allow disabling node meta overrides
This commit is contained in:
parent
2be19dc6d2
commit
20a9a9ce93
|
@ -25,6 +25,9 @@ sent to them to try and make sure they are at least usable.
|
||||||
- If your mod stores `minetest.show_formspec` during load time, you'll need to
|
- 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
|
add `fs51` as an optional dependency to `mod.conf` so it can use the patched
|
||||||
show_formspec code.
|
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).
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,10 @@ minetest.register_on_joinplayer(function(player)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
if minetest.settings:get_bool('fs51.disable_meta_override') then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Patch minetest.get_meta()
|
-- Patch minetest.get_meta()
|
||||||
-- Inspired by https://gitlab.com/sztest/nodecore/-/blob/master/mods/nc_api
|
-- Inspired by https://gitlab.com/sztest/nodecore/-/blob/master/mods/nc_api
|
||||||
local old_nodemeta_set_string
|
local old_nodemeta_set_string
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Disables all automatic formspec translation.
|
||||||
|
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
|
Loading…
Reference in New Issue