24 lines
661 B
Lua
24 lines
661 B
Lua
|
|
local trash = minetest.create_detached_inventory("trash", {
|
|
on_put = function(inv, listname, index, stack, player)
|
|
inv:set_stack(listname, index, nil)
|
|
end,
|
|
})
|
|
|
|
trash:set_size("main", 1)
|
|
|
|
sfinv.override_page("sfinv:crafting", {
|
|
title = "Crafting",
|
|
get = function(self, player, context)
|
|
return sfinv.make_formspec(player, context, [[
|
|
list[current_player;craft;1.75,0.5;3,3;]
|
|
list[current_player;craftpreview;5.75,1.5;1,1;]
|
|
list[detached:trash;main;0.25,2.5;1,1;]
|
|
image[0.25,2.5;1,1;sfinv_trash.png]
|
|
image[4.75,1.5;1,1;sfinv_crafting_arrow.png]
|
|
listring[current_player;main]
|
|
listring[current_player;craft]
|
|
]], true)
|
|
end
|
|
})
|