diff --git a/depends.txt b/depends.txt index c03e1b5..bb9ab54 100644 --- a/depends.txt +++ b/depends.txt @@ -1,8 +1,8 @@ default xpanes? -moreblocks -mesecons -mesecons_microcontroller -mesecons_button -mesecons_torch -dye +moreblocks? +mesecons? +mesecons_microcontroller? +mesecons_button? +mesecons_torch? +dye? diff --git a/init.lua b/init.lua index c57db1f..2b4db46 100644 --- a/init.lua +++ b/init.lua @@ -17,7 +17,7 @@ local builder_formspec = default.get_hotbar_bg(0,4.85) local input_items = { - {"default:steel_ingot 1", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black", "scifi_nodes:black"} + {"default:steel_ingot 1", "scifi_nodes:black", "scifi_nodes:blue", "scifi_nodes:rough", "scifi_nodes:rust", "scifi_nodes:white", "scifi_nodes:grey", "scifi_nodes:pplwll", "scifi_nodes:greenmetal", "scifi_nodes:wall", "scifi_nodes:blue_square", "scifi_nodes:mesh", "scifi_nodes:greytile"} } minetest.register_node("scifi_nodes:builder", { @@ -44,6 +44,11 @@ minetest.register_node("scifi_nodes:builder", { on_metadata_inventory_put = function(pos, listname, index, stack, player) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() + local player_inv = player:get_inventory() + if listname == "output" then + player_inv:add_item("main", stack) + inv:set_stack("output", index, "") + end if listname == "input" then for _, row in ipairs(input_items) do local item = row[1]