remove mesecons dependancy, improve builder

This commit is contained in:
D00Med 2017-03-07 14:25:28 +10:00
parent b984b92589
commit ca51ce0b97
2 changed files with 12 additions and 7 deletions

View File

@ -1,8 +1,8 @@
default default
xpanes? xpanes?
moreblocks moreblocks?
mesecons mesecons?
mesecons_microcontroller mesecons_microcontroller?
mesecons_button mesecons_button?
mesecons_torch mesecons_torch?
dye dye?

View File

@ -17,7 +17,7 @@ local builder_formspec =
default.get_hotbar_bg(0,4.85) default.get_hotbar_bg(0,4.85)
local input_items = { 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", { 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) on_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() 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 if listname == "input" then
for _, row in ipairs(input_items) do for _, row in ipairs(input_items) do
local item = row[1] local item = row[1]