Mailbox : drop unecessary conditions
This commit is contained in:
parent
cc829021fc
commit
5675a518ef
@ -70,15 +70,11 @@ xdecor.register("mailbox", {
|
|||||||
|
|
||||||
local function img_col(stack)
|
local function img_col(stack)
|
||||||
if not stack then return "" end
|
if not stack then return "" end
|
||||||
if stack.type == "node" then
|
|
||||||
if stack.inventory_image ~= "" then
|
if stack.inventory_image ~= "" then
|
||||||
return stack.inventory_image:match("([%w_]+)%.png")..".png"
|
return stack.inventory_image:match("([%w_]+)%.png")..".png"
|
||||||
else
|
else
|
||||||
return stack.tiles[1]:match("([%w_]+)%.png")..".png"
|
return stack.tiles[1]:match("([%w_]+)%.png")..".png"
|
||||||
end
|
end
|
||||||
elseif stack.type == "tool" or stack.type == "craft" then
|
|
||||||
return stack.inventory_image:match("([%w_]+)%.png")..".png"
|
|
||||||
else return "" end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function mailbox.formspec(pos, owner, num)
|
function mailbox.formspec(pos, owner, num)
|
||||||
|
Loading…
Reference in New Issue
Block a user