1
0
Fork 0

Fix up formspecs on pre-0.87.0 beacons, fix typo

This commit is contained in:
teknomunk 2024-05-29 06:45:51 -05:00
parent 7d0f49a218
commit f621e3c1de
2 changed files with 11 additions and 4 deletions

View File

@ -253,8 +253,7 @@ minetest.register_node("mcl_beacons:beacon", {
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("input", 1) inv:set_size("input", 1)
local form = formspec_string meta:set_string("formspec", formspec_string)
meta:set_string("formspec", form)
end, end,
on_destruct = function(pos) on_destruct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -434,6 +433,14 @@ minetest.register_abm{
apply_effects_to_all_players(pos) apply_effects_to_all_players(pos)
end, end,
} }
minetest.register_lbm({
label = "Update beacon formspecs (0.87.1)",
nodenames = { "mcl_beacons:beacon" },
action = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", form)
end
})
minetest.register_craft({ minetest.register_craft({
output = "mcl_beacons:beacon", output = "mcl_beacons:beacon",

View File

@ -654,7 +654,7 @@ end
minetest.register_alias("mcl_hoppers:hopper_item", "mcl_hoppers:hopper") minetest.register_alias("mcl_hoppers:hopper_item", "mcl_hoppers:hopper")
minetest.register_lbm({ minetest.register_lbm({
label = "Update hopper formspecs (0.60.0", label = "Update hopper formspecs (0.60.0)",
name = "mcl_hoppers:update_formspec_0_60_0", name = "mcl_hoppers:update_formspec_0_60_0",
nodenames = {"group:hopper"}, nodenames = {"group:hopper"},
run_at_every_load = false, run_at_every_load = false,