Also clear chessboard inventories
This commit is contained in:
parent
1be4aa3c69
commit
96f08824d4
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user