Aktualizovat „basic_machines/constructor.lua“

This commit is contained in:
Milan2018 2020-04-23 19:22:58 +02:00
parent b713e35eb4
commit 9a1dc059b3

View file

@ -224,7 +224,7 @@ minetest.register_node("basic_machines:constructor", {
}, },
}) })
--[[
minetest.register_craft({ minetest.register_craft({
output = "basic_machines:constructor", output = "basic_machines:constructor",
recipe = { recipe = {
@ -232,5 +232,126 @@ minetest.register_craft({
{"default:steel_ingot","default:copperblock","default:steel_ingot"}, {"default:steel_ingot","default:copperblock","default:steel_ingot"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
}
})
--]]
---------------------------
-- !!! replace nodes !!! --
---------------------------
local function replace_node(t)
minetest.register_abm({
label = "replace node",
nodenames = t.names or {t.name},
neighbors = t.need or nil,
interval = t.i or 2,
chance = t.ch or 3,
action = function(pos)
local node = minetest.get_node(pos)
node.name = t.to or t.to_name or "air"
minetest.swap_node(pos, node)
end
})
end
-- receptor --
replace_node({name = "basic_machines:keypad", to = "default:wood"})
replace_node({name = "clock_generator", to = "default:diamondblock"})
-- effector --
replace_node({name = "basic_machines:light_on", to = "mesecons_lightstone:lightstone_white_on"})
replace_node({name = "basic_machines:light_off", to = "mesecons_lightstone:lightstone_white_off"})
-- conductor --
minetest.register_craft({
output = "basic_machines:distributor",
recipe = {
{"default:steel_ingot","mesecons:wire_00000000_off", "default:steel_ingot"},
{"mesecons:wire_00000000_off","default:mese","mesecons:wire_00000000_off"},
{"default:steel_ingot","mesecons:wire_00000000_off","default:steel_ingot"},
}
})
replace_node({name = "basic_machines:detector", to = "default:mese"})
-- machines --
replace_node({name = "basic_machines:mover", to = "default:mese", need = {"air"}})
replace_node({name = "basic_machines:constructor", to = "default:copperblock", need = {"air"}})
-- inventory machines --
replace_node({name = "basic_machines:autocrafter", to = "pipeworks:autocrafter"})
minetest.register_craft({
output = "basic_machines:grinder",
recipe = {
{"default:diamond","default:mese","default:diamond"},
{"default:mese","default:diamondblock","default:mese"},
{"default:diamond","default:mese","default:diamond"},
}
})
minetest.register_craft({
output = "basic_machines:recycler",
recipe = {
{"default:mese_crystal","default:mese_crystal","default:mese_crystal"},
{"default:mese_crystal","default:diamondblock","default:mese_crystal"},
{"default:mese_crystal","default:mese_crystal","default:mese_crystal"},
}
})
-- power --
minetest.register_craft({
output = "basic_machines:generator",
recipe = {
{"default:diamondblock","default:goldblock","default:diamondblock"},
{"default:goldblock","default:diamondblock","default:goldblock"},
{"default:diamondblock","default:goldblock","default:diamondblock"},
}
})
minetest.register_craft({
output = "basic_machines:battery_0",
recipe = {
{"default:bronzeblock","default:mese","default:bronzeblock"},
{"","default:diamond",""},
{"","",""},
}
})
minetest.register_craft({
output = "basic_machines:power_block 5",
recipe = {
{"basic_machines:power_rod","",""},
{"","",""},
{"","",""},
}
})
minetest.register_craft({
output = "basic_machines:power_cell 5",
recipe = {
{"basic_machines:power_block","",""},
{"","",""},
{"","",""},
}
})
minetest.register_craft({
output = "default:coal_lump",
recipe = {
{"basic_machines:power_cell","basic_machines:power_cell",""},
{"","",""},
{"","",""},
}
})
minetest.register_craft({
output = "default:coal_lump",
recipe = {
{"basic_machines:power_cell","",""},
{"basic_machines:power_cell","",""},
{"","",""},
} }
}) })