From 96f08824d474e3ef5a098fd87139731e310ffabe Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 1 Jul 2023 16:29:39 +0200 Subject: [PATCH] Also clear chessboard inventories --- src/chess.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chess.lua b/src/chess.lua index 6038954..ea8a1da 100644 --- a/src/chess.lua +++ b/src/chess.lua @@ -1470,7 +1470,7 @@ if ENABLE_CHESS_GAMES then }) else minetest.register_lbm({ - label = "Clear chessboard formspec+infotext (disable Chess games)", + label = "Clear chessboard formspec+infotext+inventory (disable Chess games)", name = "xdecor:chessboard_clear", nodenames = {"realchess:chessboard"}, run_at_every_load = true, @@ -1478,6 +1478,8 @@ else local meta = minetest.get_meta(pos) meta:set_string("formspec", "") meta:set_string("infotext", "") + local inv = meta:get_inventory() + inv:set_size("board", 0) end, }) end