From 34e5f2d5775a67a983768b6b346180cbb43e8dff Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 21 Jul 2023 09:30:32 +0200 Subject: [PATCH] Allow chessboard dig during bot vs bot match --- src/chess.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chess.lua b/src/chess.lua index b203af8..7f892d3 100644 --- a/src/chess.lua +++ b/src/chess.lua @@ -3069,7 +3069,10 @@ function realchess.can_dig(pos, player) local playerBlack = meta:get_string("playerBlack") local botColor = meta:get_string("botColor") - if (meta:get_string("gameResult") ~= "") then + -- Bot matches always allow dig + if (meta:get_string("mode") == "bot_vs_bot") then + return true + elseif (meta:get_string("gameResult") ~= "") then -- If the game was completed, the board is free to be dug return true -- If the game is ongoing and no move was made for TIMEOUT seconds,