Also clear chessboard inventories

This commit is contained in:
Wuzzy 2023-07-01 16:29:39 +02:00
parent 1be4aa3c69
commit 96f08824d4

View File

@ -1470,7 +1470,7 @@ if ENABLE_CHESS_GAMES then
}) })
else else
minetest.register_lbm({ minetest.register_lbm({
label = "Clear chessboard formspec+infotext (disable Chess games)", label = "Clear chessboard formspec+infotext+inventory (disable Chess games)",
name = "xdecor:chessboard_clear", name = "xdecor:chessboard_clear",
nodenames = {"realchess:chessboard"}, nodenames = {"realchess:chessboard"},
run_at_every_load = true, run_at_every_load = true,
@ -1478,6 +1478,8 @@ else
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", "") meta:set_string("formspec", "")
meta:set_string("infotext", "") meta:set_string("infotext", "")
local inv = meta:get_inventory()
inv:set_size("board", 0)
end, end,
}) })
end end