From 9a1dc059b303941a1fd992e344e3118c37a4c1fb Mon Sep 17 00:00:00 2001 From: Milan2018 Date: Thu, 23 Apr 2020 19:22:58 +0200 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Ebasic=5Fmachines/constr?= =?UTF-8?q?uctor.lua=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic_machines/constructor.lua | 123 ++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 1 deletion(-) diff --git a/basic_machines/constructor.lua b/basic_machines/constructor.lua index b7e1289..d9712f5 100644 --- a/basic_machines/constructor.lua +++ b/basic_machines/constructor.lua @@ -224,7 +224,7 @@ minetest.register_node("basic_machines:constructor", { }, }) - +--[[ minetest.register_craft({ output = "basic_machines:constructor", recipe = { @@ -232,5 +232,126 @@ minetest.register_craft({ {"default:steel_ingot","default:copperblock","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","",""}, + {"","",""}, + } }) \ No newline at end of file