Chess: Improved chess figurines for notation

This commit is contained in:
Wuzzy 2023-07-15 08:23:24 +02:00
parent cede0534eb
commit fabfc35579
14 changed files with 7 additions and 3 deletions

View File

@ -7,6 +7,10 @@
│ Textures (radio and speaker) by │
│ MCL <temp1@cubesoftware.xyz> (CC BY 4.0 Int'l) │
│ │
│ Textures (Chess icons for the Chess notation) │
│ originally by Wikimedia user Cbnurnett, │
│ scaled down and edited by Wuzzy (CC BY-SA 3.0 Unported) │
│ │
│ Textures (hanging candle) by │
│ Wuzzy (CC0) │
│ │

View File

@ -802,7 +802,7 @@ local pieces_str, x = "", 0
for i = 1, #pieces do
local p = pieces[i]:match(":(%w+_%w+)")
if pieces[i]:find(":(%w+)_(%w+)") and not pieces_str:find(p) then
pieces_str = pieces_str .. x .. "=" .. p .. ".png,"
pieces_str = pieces_str .. x .. "=chess_figurine_" .. p .. ".png,"
x = x + 1
end
end
@ -900,9 +900,9 @@ local function get_moves_formstring(meta)
if pieceFrom:sub(11,14) == "pawn" then
pieceFrom_si_id = MOVES_LIST_SYMBOL_EMPTY
else
pieceFrom_si_id = pieces_str:match("(%d+)=" .. pieceFrom_s)
pieceFrom_si_id = pieces_str:match("(%d+)=chess_figurine_" .. pieceFrom_s)
end
local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=" .. pieceTo_s) or ""
local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=chess_figurine_" .. pieceTo_s) or ""
local coordFrom = index_to_notation(from_idx)
local coordTo = index_to_notation(to_idx)

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B