1
0
mirror of https://codeberg.org/minenux/minetest-mod-xdecor synced 2023-10-20 21:43:39 -07:00

Chess : show last move time in chat

This commit is contained in:
jp 2015-11-21 19:27:21 +01:00
parent 4c13a9f2f3
commit 789ab30b1d

View File

@ -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