Minor cleanup
This commit is contained in:
parent
354561d54c
commit
2db1e885fc
|
@ -37,7 +37,7 @@ local function cache_groups(groupname, groups)
|
||||||
for i = 1, nb_items do
|
for i = 1, nb_items do
|
||||||
local item = items[i]
|
local item = items[i]
|
||||||
local def = reg_items[item]
|
local def = reg_items[item]
|
||||||
local texture = def.inventory_image or def.wield_image or ""
|
local texture = def.inventory_image or def.wield_image
|
||||||
|
|
||||||
if is_cube(def.drawtype) then
|
if is_cube(def.drawtype) then
|
||||||
texture = get_cube(def.tiles)
|
texture = get_cube(def.tiles)
|
||||||
|
@ -52,19 +52,6 @@ local function cache_groups(groupname, groups)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
core.register_chatcommand("test", {
|
|
||||||
func = function(name, param)
|
|
||||||
core.get_player_by_name(name):hud_add({
|
|
||||||
hud_elem_type = "image",
|
|
||||||
position = {x = 0.6, y = 0.5},
|
|
||||||
scale = {x = 1, y = 1},
|
|
||||||
text = param
|
|
||||||
})
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
local function get_item_usages(item, recipe, added)
|
local function get_item_usages(item, recipe, added)
|
||||||
if is_group(item) then
|
if is_group(item) then
|
||||||
local groupname = item:sub(7)
|
local groupname = item:sub(7)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue