From 06a954415931f54460b4fa8a850e86ea0e25da71 Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:14:35 -0500 Subject: [PATCH] support more crafts --- crafts.lua | 46 +++++++++++++++++++++++++++++++++++++++++++++- routing_tubes.lua | 32 -------------------------------- signal_tubes.lua | 4 ++-- 3 files changed, 47 insertions(+), 35 deletions(-) diff --git a/crafts.lua b/crafts.lua index 642acec..4e6fb35 100644 --- a/crafts.lua +++ b/crafts.lua @@ -260,4 +260,48 @@ minetest.register_craft({ { materials.steel_ingot, "", materials.steel_ingot }, { materials.steel_ingot, materials.steel_ingot, materials.steel_ingot }, }, -}) \ No newline at end of file +}) + +if pipeworks.enable_priority_tube then + minetest.register_craft( { + output = "pipeworks:priority_tube_1 6", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, + { materials.gold_ingot, "", materials.gold_ingot }, + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, + }) +end + +if pipeworks.enable_accelerator_tube then + minetest.register_craft( { + output = "pipeworks:accelerator_tube_1 2", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, + { materials.mese_crystal_fragment, materials.steel_ingot, materials.mese_crystal_fragment }, + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, + }) +end + +if pipeworks.enable_crossing_tube then + minetest.register_craft( { + output = "pipeworks:crossing_tube_1 5", + recipe = { + { "", "pipeworks:tube_1", "" }, + { "pipeworks:tube_1", "pipeworks:tube_1", "pipeworks:tube_1" }, + { "", "pipeworks:tube_1", "" } + }, + }) +end + +if pipeworks.enable_one_way_tube then + minetest.register_craft({ + output = "pipeworks:one_way_tube 2", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, + { "group:stick", materials.mese_crystal, "basic_materials:plastic_sheet" }, + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, + }) +end \ No newline at end of file diff --git a/routing_tubes.lua b/routing_tubes.lua index 9fd3935..5e5fe0a 100644 --- a/routing_tubes.lua +++ b/routing_tubes.lua @@ -106,14 +106,6 @@ if pipeworks.enable_priority_tube then tube = { priority = 150 } -- higher than tubedevices (100) }, }) - minetest.register_craft( { - output = "pipeworks:priority_tube_1 6", - recipe = { - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, - { "default:gold_ingot", "", "default:gold_ingot" }, - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } - }, - }) end if pipeworks.enable_accelerator_tube then @@ -131,14 +123,6 @@ if pipeworks.enable_accelerator_tube then end} }, }) - minetest.register_craft( { - output = "pipeworks:accelerator_tube_1 2", - recipe = { - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, - { "default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment" }, - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } - }, - }) end if pipeworks.enable_crossing_tube then @@ -153,14 +137,6 @@ if pipeworks.enable_crossing_tube then tube = {can_go = function(pos, node, velocity, stack) return {velocity} end } }, }) - minetest.register_craft( { - output = "pipeworks:crossing_tube_1 5", - recipe = { - { "", "pipeworks:tube_1", "" }, - { "pipeworks:tube_1", "pipeworks:tube_1", "pipeworks:tube_1" }, - { "", "pipeworks:tube_1", "" } - }, - }) end local texture_alpha_mode = minetest.features.use_texture_alpha_string_modes @@ -199,12 +175,4 @@ if pipeworks.enable_one_way_tube then check_for_horiz_pole = pipeworks.check_for_horiz_tube }) pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:one_way_tube" - minetest.register_craft({ - output = "pipeworks:one_way_tube 2", - recipe = { - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, - { "group:stick", "default:mese_crystal", "basic_materials:plastic_sheet" }, - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } - }, - }) end diff --git a/signal_tubes.lua b/signal_tubes.lua index cabf488..2713507 100644 --- a/signal_tubes.lua +++ b/signal_tubes.lua @@ -11,7 +11,7 @@ local function after_break(pos) end end -if pipeworks.enable_detector_tube then +if minetest.get_modpath("mesecons") and pipeworks.enable_detector_tube then local detector_tube_step = 5 * tonumber(minetest.settings:get("dedicated_server_step")) pipeworks.register_tube("pipeworks:detector_tube_on", { description = S("Detecting Pneumatic Tube Segment on"), @@ -137,7 +137,7 @@ if digiline_enabled and pipeworks.enable_digiline_detector_tube then }) end -if pipeworks.enable_conductor_tube then +if minetest.get_modpath("mesecons") and pipeworks.enable_conductor_tube then pipeworks.register_tube("pipeworks:conductor_tube_off", { description = S("Conducting Pneumatic Tube Segment"), inventory_image = "pipeworks_conductor_tube_inv.png",