From 789ab30b1d697596f6dfb6084c3e7af3a759e95f Mon Sep 17 00:00:00 2001 From: jp Date: Sat, 21 Nov 2015 19:27:21 +0100 Subject: [PATCH] Chess : show last move time in chat --- chess.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chess.lua b/chess.lua index 66523da..c966221 100644 --- a/chess.lua +++ b/chess.lua @@ -528,9 +528,9 @@ function realchess.move(pos, from_list, from_index, to_list, to_index, count, pl meta:set_int("lastMoveTime", minetest.get_gametime()) if meta:get_string("lastMove") == "black" then - minetest.chat_send_player(playerWhite, playerName.." has moved a "..pieceFrom:match("%a+:(%a+)")..", it's now your turn.") + minetest.chat_send_player(playerWhite, "["..os.date("%H:%M:%S").."] "..playerName.." has moved a "..pieceFrom:match("%a+:(%a+)")..", it's now your turn.") elseif meta:get_string("lastMove") == "white" then - minetest.chat_send_player(playerBlack, playerName.." has moved a "..pieceFrom:match("%a+:(%a+)")..", it's now your turn.") + minetest.chat_send_player(playerBlack, "["..os.date("%H:%M:%S").."] "..playerName.." has moved a "..pieceFrom:match("%a+:(%a+)")..", it's now your turn.") end if pieceTo:find("king") then