Skip to content
Snippets Groups Projects
Commit deb24193 authored by JPG's avatar JPG
Browse files

Ensure compatibility with older clients (<= 0.4.14)

parent a939dbd3
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,10 @@ function enchanting:get_tooltip(enchant, orig_caps, fleshy)
strong = {"#ff3d3d", ""},
speed = {"#fd5eff", ""}
}
return minetest.colorize(specs[enchant][1], "\n"..cap(enchant)..specs[enchant][2])
return minetest.colorize and
minetest.colorize(specs[enchant][1],
"\n"..cap(enchant)..specs[enchant][2]) or
"\n"..cap(enchant)..specs[enchant][2]
end
local enchant_buttons = {
......
......@@ -44,7 +44,8 @@ function mailbox:formspec(pos, owner, is_owner)
giver = giver.."#FFFF00,"..giver_name..","..i..
",#FFFFFF,x "..stack_count..","
img = img..i.."="..img_col(stack_name).."^\\[resize:16x16,"
img = img..i.."="..
img_col(stack_name).."^\\[resize:16x16,"
end
end
......@@ -63,7 +64,9 @@ function mailbox:formspec(pos, owner, is_owner)
end
return [[ size[8,5]
list[current_player;main;0,1.25;8,4;] ]]..
"label[0,0;Send your goods to\n"..minetest.colorize("#FFFF00", owner).."]"..
"label[0,0;Send your goods to\n"..
(minetest.colorize and
minetest.colorize("#FFFF00", owner) or owner).."]"..
"list[nodemeta:"..spos..";drop;3.5,0;1,1;]"..
xbg..default.get_hotbar_bg(0,1.25)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment