mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 11:45:10 +00:00
Signs: Add replacement character
This commit is contained in:
parent
267cf5c4a6
commit
579e526615
2 changed files with 5 additions and 1 deletions
|
@ -85,6 +85,7 @@ local generate_line = function(s, ypos)
|
||||||
local printed_char_width = CHAR_WIDTH + 1
|
local printed_char_width = CHAR_WIDTH + 1
|
||||||
while chars <= LINE_LENGTH and i <= #s do
|
while chars <= LINE_LENGTH and i <= #s do
|
||||||
local file = nil
|
local file = nil
|
||||||
|
-- Get and render character
|
||||||
if charmap[s:sub(i, i)] ~= nil then
|
if charmap[s:sub(i, i)] ~= nil then
|
||||||
file = charmap[s:sub(i, i)]
|
file = charmap[s:sub(i, i)]
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
@ -92,8 +93,11 @@ local generate_line = function(s, ypos)
|
||||||
file = charmap[s:sub(i, i + 1)]
|
file = charmap[s:sub(i, i + 1)]
|
||||||
i = i + 2
|
i = i + 2
|
||||||
else
|
else
|
||||||
minetest.log("warning", "[mcl_signs] Unknown symbol in '"..s.."' at "..i.." (probably "..s:sub(i, i)..")")
|
-- No character image found.
|
||||||
|
-- Use replacement character:
|
||||||
|
file = "_rc"
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
minetest.log("verbose", "[mcl_signs] Unknown symbol in '"..s.."' at "..i)
|
||||||
end
|
end
|
||||||
if file ~= nil then
|
if file ~= nil then
|
||||||
width = width + printed_char_width
|
width = width + printed_char_width
|
||||||
|
|
BIN
mods/ITEMS/mcl_signs/textures/_rc.png
Normal file
BIN
mods/ITEMS/mcl_signs/textures/_rc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 902 B |
Loading…
Reference in a new issue