mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-11-08 16:33:58 +01:00
This commit is contained in:
commit
6b511d98f8
236
crafts.lua
236
crafts.lua
@ -1,86 +1,167 @@
|
|||||||
-- Crafting recipes for pipeworks
|
-- Crafting recipes for pipes
|
||||||
|
|
||||||
-- If the technic mod is present, then don't bother registering these recipes
|
minetest.register_craft( {
|
||||||
-- as that mod supplies its own.
|
output = "pipeworks:pipe_110000_empty 12",
|
||||||
|
recipe = {
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||||
|
{ "", "", "" },
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
if io.open(minetest.get_modpath("pipeworks").."/../technic/init.lua", "r") == nil then
|
minetest.register_craft( {
|
||||||
|
output = "pipeworks:spigot 3",
|
||||||
|
recipe = {
|
||||||
|
{ "pipeworks:pipe_110000_empty", "" },
|
||||||
|
{ "", "pipeworks:pipe_110000_empty" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
-- If homedecor is not installed, we need to register a few of its crafts
|
minetest.register_craft( {
|
||||||
-- manually so we can use them.
|
output = "pipeworks:entry_panel 2",
|
||||||
|
recipe = {
|
||||||
|
{ "", "default:steel_ingot", "" },
|
||||||
|
{ "", "pipeworks:pipe_110000_empty", "" },
|
||||||
|
{ "", "default:steel_ingot", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("homedecor") == nil then
|
-- Various ancillary pipe devices
|
||||||
|
|
||||||
minetest.register_craftitem(":homedecor:plastic_sheeting", {
|
minetest.register_craft( {
|
||||||
description = "Plastic sheet",
|
output = "pipeworks:pump_off 2",
|
||||||
inventory_image = "pipeworks_plastic_sheeting.png",
|
recipe = {
|
||||||
})
|
{ "default:stone", "default:steel_ingot", "default:stone" },
|
||||||
|
{ "moreores:copper_ingot", "default:mese_crystal_fragment", "moreores:copper_ingot" },
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft( {
|
||||||
type = "cooking",
|
output = "pipeworks:valve_off 2",
|
||||||
output = "homedecor:plastic_sheeting",
|
recipe = {
|
||||||
recipe = "default:junglegrass",
|
{ "", "default:stick", "" },
|
||||||
})
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||||
|
{ "", "default:steel_ingot", "" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft( {
|
||||||
type = 'fuel',
|
output = "pipeworks:storage_tank_0 2",
|
||||||
recipe = 'homedecor:plastic_sheeting',
|
recipe = {
|
||||||
burntime = 30,
|
{ "", "default:steel_ingot", "default:steel_ingot" },
|
||||||
})
|
{ "default:steel_ingot", "default:glass", "default:steel_ingot" },
|
||||||
end
|
{ "default:steel_ingot", "default:steel_ingot", "" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "pipeworks:pipe_110000_empty 12",
|
output = "pipeworks:grating 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||||
{ "", "", "" },
|
{ "", "default:steel_ingot", "" },
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
{ "default:steel_ingot", "", "default:steel_ingot" }
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Various ancillary tube devices
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "pipeworks:filter 2",
|
||||||
|
recipe = {
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" },
|
||||||
|
{ "default:stick", "default:mese_crystal", "homedecor:plastic_sheeting" },
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "pipeworks:mese_filter 2",
|
||||||
|
recipe = {
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" },
|
||||||
|
{ "default:stick", "default:mese", "homedecor:plastic_sheeting" },
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- The tubes themselves
|
||||||
|
|
||||||
|
|
||||||
|
-- If homedecor is not installed, we need to register its crafting chain for
|
||||||
|
-- plastic sheeting so that pipeworks remains compatible with it.
|
||||||
|
|
||||||
|
if minetest.get_modpath("homedecor") == nil then
|
||||||
|
|
||||||
|
minetest.register_craftitem(":homedecor:plastic_sheeting", {
|
||||||
|
description = "Plastic sheet",
|
||||||
|
inventory_image = "homedecor_plastic_sheeting.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craftitem(":homedecor:plastic_base", {
|
||||||
output = "pipeworks:pump_off 2",
|
description = "Unprocessed Plastic base",
|
||||||
recipe = {
|
wield_image = "homedecor_plastic_base.png",
|
||||||
{ "default:stone", "default:steel_ingot", "default:stone" },
|
inventory_image = "homedecor_plastic_base_inv.png",
|
||||||
{ "moreores:copper_ingot", "default:mese_crystal_fragment", "moreores:copper_ingot" },
|
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft({
|
||||||
output = "pipeworks:valve_off 2",
|
type = "shapeless",
|
||||||
recipe = {
|
output = 'homedecor:plastic_base 6',
|
||||||
{ "", "default:stick", "" },
|
recipe = { "default:junglegrass",
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
"default:junglegrass",
|
||||||
{ "", "default:steel_ingot", "" }
|
"default:junglegrass"
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft({
|
||||||
output = "pipeworks:storage_tank_0 2",
|
type = "shapeless",
|
||||||
recipe = {
|
output = 'homedecor:plastic_base 3',
|
||||||
{ "", "default:steel_ingot", "default:steel_ingot" },
|
recipe = { "default:dry_shrub",
|
||||||
{ "default:steel_ingot", "default:glass", "default:steel_ingot" },
|
"default:dry_shrub",
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "" }
|
"default:dry_shrub"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft({
|
||||||
output = "pipeworks:grating 2",
|
type = "shapeless",
|
||||||
recipe = {
|
output = 'homedecor:plastic_base 4',
|
||||||
{ "default:steel_ingot", "", "default:steel_ingot" },
|
recipe = { "default:leaves",
|
||||||
{ "", "default:steel_ingot", "" },
|
"default:leaves",
|
||||||
{ "default:steel_ingot", "", "default:steel_ingot" }
|
"default:leaves",
|
||||||
},
|
"default:leaves",
|
||||||
|
"default:leaves",
|
||||||
|
"default:leaves"
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft({
|
||||||
output = "pipeworks:spigot 3",
|
type = "cooking",
|
||||||
recipe = {
|
output = "homedecor:plastic_sheeting",
|
||||||
{ "pipeworks:pipe_110000_empty", "" },
|
recipe = "homedecor:plastic_base",
|
||||||
{ "", "pipeworks:pipe_110000_empty" },
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'fuel',
|
||||||
|
recipe = 'homedecor:plastic_base',
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'fuel',
|
||||||
|
recipe = 'homedecor:plastic_sheeting',
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- If the technic mod is present, then don't bother registering the recipes
|
||||||
|
-- for the various tubes, as technic has its own recipes for those.
|
||||||
|
|
||||||
|
if io.open(minetest.get_modpath("pipeworks").."/../technic/init.lua", "r") == nil and
|
||||||
|
io.open(minetest.get_modpath("pipeworks").."/../technic_master/technic/init.lua", "r") == nil then
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "pipeworks:tube 12",
|
output = "pipeworks:tube 12",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -146,32 +227,5 @@ if io.open(minetest.get_modpath("pipeworks").."/../technic/init.lua", "r") == ni
|
|||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "pipeworks:filter 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" },
|
|
||||||
{ "default:stick", "default:mese_crystal", "homedecor:plastic_sheeting" },
|
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "pipeworks:mese_filter 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" },
|
|
||||||
{ "default:stick", "default:mese", "homedecor:plastic_sheeting" },
|
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "homedecor:plastic_sheeting" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "pipeworks:entry_panel 2",
|
|
||||||
recipe = {
|
|
||||||
{ "", "default:steel_ingot", "" },
|
|
||||||
{ "", "pipeworks:pipe_110000_empty", "" },
|
|
||||||
{ "", "default:steel_ingot", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
BIN
textures/homedecor_plastic_base.png
Normal file
BIN
textures/homedecor_plastic_base.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 419 B |
BIN
textures/homedecor_plastic_base_inv.png
Normal file
BIN
textures/homedecor_plastic_base_inv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 561 B |
BIN
textures/homedecor_plastic_sheeting.png
Normal file
BIN
textures/homedecor_plastic_sheeting.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 198 B |
Loading…
Reference in New Issue
Block a user