Remove rp_formspec.fake_simple_itemstack

master
Wuzzy 2022-08-10 16:00:41 +02:00
parent 64d8368c65
commit b5e9c1770a
2 changed files with 0 additions and 35 deletions

View File

@ -119,19 +119,6 @@ the items tooltip.
### `rp_formspec.fake_simple_itemstack(x, y, itemname, name)`
Adds an item image that shows the given item. Unlike
`rp_formspec.fake_itemstack`, this accepts an itemstring
instead of an itemstack.
A tooltip for the image will be added as well, showing `name`.
* `x`, `y`: Position
* `itemname`: Itemstring of the item to represent
* `name`: Internal name to use for the formspec element, also the tooltip
### `rp_formspec.fake_itemstack_any(x, y, itemstack, name)`
Convenience function that either uses `rp_formspec.fake_itemstack` or

View File

@ -215,28 +215,6 @@ function rp_formspec.fake_itemstack(x, y, itemstack)
return result
end
function rp_formspec.fake_simple_itemstack(x, y, itemname, name)
local name = name or "fake_simple_itemstack"
local itemdesc = ""
if minetest.registered_items[itemname]
and minetest.registered_items[itemname].description ~= nil then
itemdesc = minetest.registered_items[itemname].description
end
local result = ""
if itemname ~= "" then
result = result .. "image_button["..x..","..y..";1,1;blank.png;"
..name..";;false;false;blank.png]"
result = result .. "item_image["..x..","..y..";1,1;"
..minetest.formspec_escape(itemname).."]"
result = result .. "tooltip["..name..";"
..minetest.formspec_escape(itemdesc).."]"
end
return result
end
function rp_formspec.item_group(x, y, group, count, name)
local name = name or "fake_itemgroup"