forked from mtcontrib/scifi_nodes
remove mesecons dependancy, improve builder
This commit is contained in:
parent
b984b92589
commit
ca51ce0b97
12
depends.txt
12
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?
|
||||
|
7
init.lua
7
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]
|
||||
|
Loading…
Reference in New Issue
Block a user