mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-05-13 22:30:21 +02:00
partially move crafts to crafts.lua
This commit is contained in:
parent
4ce2cbd4b8
commit
c07ff1ecdc
@ -424,12 +424,3 @@ minetest.register_node("pipeworks:autocrafter", {
|
||||
},
|
||||
})
|
||||
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:autocrafter"
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:autocrafter 2",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" },
|
||||
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" },
|
||||
{ "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
204
crafts.lua
204
crafts.lua
@ -1,11 +1,118 @@
|
||||
local materials = {
|
||||
dirt = "default:dirt",
|
||||
sand = "default:sand",
|
||||
gravel = "default:gravel",
|
||||
copper_ingot = "default:copper_ingot",
|
||||
steel_ingot = "default:steel_ingot",
|
||||
gold_ingot = "default:gold_ingot",
|
||||
tin_ingot = "default:tin_ingot",
|
||||
mese = "default:mese",
|
||||
mese_crystal = "default:mese_crystal",
|
||||
mese_crystal_fragment = "default:mese_crystal_fragment",
|
||||
torch = "default:torch",
|
||||
diamond = "default:diamond",
|
||||
clay_lump = "default:clay_lump",
|
||||
water_bucket = "bucket:bucket_water",
|
||||
empty_bucket = "bucket:bucket_empty",
|
||||
dye_dark_grey = "dye:dark_grey",
|
||||
silicon = "mesecons_materials:silicon",
|
||||
stone = "default:stone",
|
||||
glass = "default:glass",
|
||||
}
|
||||
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
materials = {
|
||||
dirt = "mcl_core:dirt",
|
||||
sand = "mcl_core:sand",
|
||||
gravel = "mcl_core:gravel",
|
||||
steel_ingot = "mcl_core:iron_ingot",
|
||||
gold_ingot = "mcl_core:gold_ingot",
|
||||
mese = "default:mese",
|
||||
mese_crystal = "default:mese_crystal",
|
||||
mese_crystal_fragment = "mesecons:redstone",
|
||||
torch = "mcl_torches:torch",
|
||||
diamond = "mcl_core:diamond",
|
||||
clay_lump = "mcl_core:clay_lump",
|
||||
water_bucket = "mcl_buckets:bucket_water",
|
||||
empty_bucket = "mcl_buckets:bucket_empty",
|
||||
dye_dark_grey = "mcl_dye:dark_grey",
|
||||
-- Use iron where no equivalent
|
||||
copper_ingot = "mcl_core:iron_ingot",
|
||||
tin_ingot = "mcl_core:iron_ingot",
|
||||
silver_ingot = "mcl_core:iron_ingot",
|
||||
silicon = "mesecons_materials:silicon",
|
||||
stone = "default:stone",
|
||||
glass = "default:glass",
|
||||
}
|
||||
elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then
|
||||
materials = {
|
||||
dirt = "fl_topsoil:dirt",
|
||||
sand = "fl_stone:sand",
|
||||
gravel = "fl_topsoil:gravel",
|
||||
steel_ingot = "fl_ores:iron_ingot",
|
||||
gold_ingot = "fl_ores:gold_ingot",
|
||||
mese = "fl_ores:iron_ingot",
|
||||
mese_crystal = "fl_ores:iron_ingot",
|
||||
mese_crystal_fragment = "fl_ores:iron_ingot",
|
||||
torch = "fl_light_sources:torch",
|
||||
diamond = "fl_ores:diamond",
|
||||
clay_lump = "fl_bricks:clay_lump",
|
||||
water_bucket = "fl_bucket:bucket_water",
|
||||
empty_bucket = "fl_bucket:bucket",
|
||||
dye_dark_grey = "fl_dyes:dark_grey_dye",
|
||||
copper_ingot = "fl_ores:copper_ingot",
|
||||
tin_ingot = "fl_ores:tin_ingot",
|
||||
silver_ingot = "fl_ores:iron_ingot",
|
||||
silicon = "mesecons_materials:silicon",
|
||||
stone = "fl_stone:stone",
|
||||
glass = "fl_glass:framed_glass",
|
||||
}
|
||||
elseif minetest.get_modpath("hades_core") then
|
||||
materials = {
|
||||
dirt = "hades_core:dirt",
|
||||
sand = "hades_core:fertile_sand",
|
||||
gravel = "hades_core:gravel",
|
||||
steel_ingot = "hades_core:steel_ingot",
|
||||
gold_ingot = "hades_core:gold_ingot",
|
||||
mese = "default:mese",
|
||||
mese_crystal = "default:mese_crystal",
|
||||
mese_crystal_fragment = "hades_core:mese_crystal_fragment",
|
||||
torch = "hades_torches:torch",
|
||||
diamond = "hades_core:diamond",
|
||||
clay_lump = "hades_core:clay_lump",
|
||||
dye_dark_grey = "dye:dark_grey",
|
||||
copper_ingot = "hades_core:copper_ingot",
|
||||
tin_ingot = "hades_core:tin_ingot",
|
||||
--[[
|
||||
Since hades doesnt have buckets or water for the user,
|
||||
using dirt from near water to pull the water out
|
||||
]]
|
||||
water_bucket = "hades_core:dirt",
|
||||
empty_bucket = "hades_core:fertile_sand",
|
||||
-- Set this to steel unless hadesextraores is present
|
||||
silver_ingot = "hades_core:steel_ingot",
|
||||
silicon = "hades_materials:silicon",
|
||||
stone = "default:stone",
|
||||
glass = "default:glass",
|
||||
}
|
||||
|
||||
if minetest.get_modpath("hades_bucket") then
|
||||
materials["water_bucket"] = "hades_bucket:bucket_water"
|
||||
materials["empty_bucket"] = "hades_bucket:bucket_empty"
|
||||
end
|
||||
if minetest.get_modpath("hades_extraores") then
|
||||
materials["silver_ingot"] = "hades_extraores:silver_ingot"
|
||||
end
|
||||
end
|
||||
|
||||
-- Crafting recipes for pipes
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:pipe_1_empty 12",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot },
|
||||
{ "", "", "" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot }
|
||||
},
|
||||
})
|
||||
|
||||
@ -27,9 +134,9 @@ minetest.register_craft( {
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:entry_panel_empty 2",
|
||||
recipe = {
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "", materials.steel_ingot, "" },
|
||||
{ "", "pipeworks:pipe_1_empty", "" },
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "", materials.steel_ingot, "" },
|
||||
},
|
||||
})
|
||||
|
||||
@ -38,9 +145,9 @@ recipe = {
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:pump_off 2",
|
||||
recipe = {
|
||||
{ "default:stone", "default:steel_ingot", "default:stone" },
|
||||
{ "default:copper_ingot", "default:mese_crystal_fragment", "default:copper_ingot" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
{ materials.stone, materials.steel_ingot, materials.stone },
|
||||
{ materials.copper_ingot, materials.mese_crystal_fragment, materials.copper_ingot },
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot }
|
||||
},
|
||||
})
|
||||
|
||||
@ -48,26 +155,26 @@ minetest.register_craft( {
|
||||
output = "pipeworks:valve_off_empty 2",
|
||||
recipe = {
|
||||
{ "", "group:stick", "" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
{ "", "default:steel_ingot", "" }
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot },
|
||||
{ "", materials.steel_ingot, "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:storage_tank_0 2",
|
||||
recipe = {
|
||||
{ "", "default:steel_ingot", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "default:glass", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "" }
|
||||
{ "", materials.steel_ingot, materials.steel_ingot },
|
||||
{ materials.steel_ingot, materials.glass, materials.steel_ingot },
|
||||
{ materials.steel_ingot, materials.steel_ingot, "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:grating 2",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||
{ materials.steel_ingot, "", materials.steel_ingot },
|
||||
{ "", "pipeworks:pipe_1_empty", "" },
|
||||
{ "default:steel_ingot", "", "default:steel_ingot" }
|
||||
{ materials.steel_ingot, "", materials.steel_ingot }
|
||||
},
|
||||
})
|
||||
|
||||
@ -85,3 +192,72 @@ minetest.register_craft( {
|
||||
{ "pipeworks:pipe_1_empty" }
|
||||
},
|
||||
})
|
||||
|
||||
-- injectors
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:filter 2",
|
||||
recipe = {
|
||||
{ materials.steel_ingot, materials.steel_ingot, "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", materials.mese_crystal, "basic_materials:plastic_sheet" },
|
||||
{ materials.steel_ingot, materials.steel_ingot, "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:mese_filter 2",
|
||||
recipe = {
|
||||
{ materials.steel_ingot, materials.steel_ingot, "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", materials.mese, "basic_materials:plastic_sheet" },
|
||||
{ materials.steel_ingot, materials.steel_ingot, "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("digilines") then
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:digiline_filter 2",
|
||||
recipe = {
|
||||
{ materials.steel_ingot, materials.steel_ingot, "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", "digilines:wire_std_00000000", "basic_materials:plastic_sheet" },
|
||||
{ materials.steel_ingot, materials.steel_ingot, "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- other
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:autocrafter 2",
|
||||
recipe = {
|
||||
{ materials.steel_ingot, materials.mese_crystal, materials.steel_ingot },
|
||||
{ "basic_materials:plastic_sheet", materials.steel_ingot, "basic_materials:plastic_sheet" },
|
||||
{ materials.steel_ingot, materials.mese_crystal, materials.steel_ingot }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:steel_block_embedded_tube 1",
|
||||
recipe = {
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot },
|
||||
{ materials.steel_ingot, "pipeworks:tube_1", materials.steel_ingot },
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:steel_pane_embedded_tube 1",
|
||||
recipe = {
|
||||
{ "", materials.steel_ingot, "" },
|
||||
{ "", "pipeworks:tube_1", "" },
|
||||
{ "", materials.steel_ingot, "" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pipeworks:trashcan",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ materials.steel_ingot, "", materials.steel_ingot },
|
||||
{ materials.steel_ingot, materials.steel_ingot, materials.steel_ingot },
|
||||
},
|
||||
})
|
@ -34,15 +34,6 @@ minetest.register_node("pipeworks:steel_block_embedded_tube", {
|
||||
})
|
||||
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:steel_block_embedded_tube"
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:steel_block_embedded_tube 1",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "pipeworks:tube_1", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||
},
|
||||
})
|
||||
|
||||
local pane_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -89,12 +80,3 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", {
|
||||
on_rotate = pipeworks.on_rotate,
|
||||
})
|
||||
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:steel_pane_embedded_tube"
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:steel_pane_embedded_tube 1",
|
||||
recipe = {
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "", "pipeworks:tube_1", "" },
|
||||
{ "", "default:steel_ingot", "" }
|
||||
},
|
||||
})
|
||||
|
@ -484,35 +484,6 @@ for _, data in ipairs({
|
||||
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:"..data.name
|
||||
end
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:filter 2",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", "default:mese_crystal", "basic_materials:plastic_sheet" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:mese_filter 2",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", "default:mese", "basic_materials:plastic_sheet" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("digilines") then
|
||||
minetest.register_craft( {
|
||||
output = "pipeworks:digiline_filter 2",
|
||||
recipe = {
|
||||
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet" },
|
||||
{ "group:stick", "digilines:wire_std_00000000", "basic_materials:plastic_sheet" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet" }
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
--[[
|
||||
In the past the filter-injectors had real items in their inventories. This code
|
||||
puts them to the input to the filter-injector if possible. Else the items are
|
||||
|
3
init.lua
3
init.lua
@ -124,7 +124,6 @@ dofile(pipeworks.modpath.."/autoplace_tubes.lua")
|
||||
dofile(pipeworks.modpath.."/luaentity.lua")
|
||||
dofile(pipeworks.modpath.."/item_transport.lua")
|
||||
dofile(pipeworks.modpath.."/flowing_logic.lua")
|
||||
dofile(pipeworks.modpath.."/crafts.lua")
|
||||
dofile(pipeworks.modpath.."/tube_registration.lua")
|
||||
dofile(pipeworks.modpath.."/routing_tubes.lua")
|
||||
dofile(pipeworks.modpath.."/sorting_tubes.lua")
|
||||
@ -158,6 +157,8 @@ if pipeworks.enable_lua_tube and
|
||||
dofile(pipeworks.modpath.."/lua_tube.lua")
|
||||
end
|
||||
|
||||
dofile(pipeworks.modpath.."/crafts.lua")
|
||||
|
||||
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
|
||||
|
||||
-- Unified Inventory categories integration
|
||||
|
@ -37,12 +37,3 @@ minetest.register_node("pipeworks:trashcan", {
|
||||
end,
|
||||
})
|
||||
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:trashcan"
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pipeworks:trashcan",
|
||||
recipe = {
|
||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user