From ff29717136ded01d4cade2a8f273d2d4234428e4 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 27 Jan 2013 13:59:18 -0500 Subject: [PATCH] tried to fix detection of latest version of technic mod. limited the number of recipes affected by it - now only the tubes' recipes are disabled when technic is present. All pipes, pipe devices, and tube devices are available at all times. updated the plastic sheet crafting chain to match current homedecor --- crafts.lua | 217 +++++++++++++++--------- textures/homedecor_plastic_base.png | Bin 0 -> 419 bytes textures/homedecor_plastic_base_inv.png | Bin 0 -> 561 bytes textures/homedecor_plastic_sheeting.png | Bin 0 -> 198 bytes 4 files changed, 136 insertions(+), 81 deletions(-) create mode 100644 textures/homedecor_plastic_base.png create mode 100644 textures/homedecor_plastic_base_inv.png create mode 100644 textures/homedecor_plastic_sheeting.png diff --git a/crafts.lua b/crafts.lua index e5adc4e..8971a67 100644 --- a/crafts.lua +++ b/crafts.lua @@ -1,86 +1,158 @@ --- Crafting recipes for pipeworks +-- Crafting recipes for pipes --- If the technic mod is present, then don't bother registering these recipes --- as that mod supplies its own. +minetest.register_craft( { + 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 - -- manually so we can use them. +minetest.register_craft( { + 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", { - description = "Plastic sheet", - inventory_image = "pipeworks_plastic_sheeting.png", - }) +minetest.register_craft( { + output = "pipeworks:pump_off 2", + 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({ - type = "cooking", - output = "homedecor:plastic_sheeting", - recipe = "default:junglegrass", - }) +minetest.register_craft( { + output = "pipeworks:valve_off 2", + recipe = { + { "", "default:stick", "" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, + { "", "default:steel_ingot", "" } + }, +}) - minetest.register_craft({ - type = 'fuel', - recipe = 'homedecor:plastic_sheeting', - burntime = 30, - }) - end +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", "" } + }, +}) - minetest.register_craft( { - 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" } - }, +minetest.register_craft( { + output = "pipeworks:grating 2", + recipe = { + { "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" } + }, +}) + + +-- 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( { - output = "pipeworks:pump_off 2", - 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_craftitem(":homedecor:plastic_base", { + description = "Unprocessed Plastic base", + wield_image = "homedecor_plastic_base.png", + inventory_image = "homedecor_plastic_base_inv.png", }) - minetest.register_craft( { - output = "pipeworks:valve_off 2", - recipe = { - { "", "default:stick", "" }, - { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, - { "", "default:steel_ingot", "" } - }, + minetest.register_craft({ + type = "shapeless", + output = 'homedecor:plastic_base 6', + recipe = { "default:junglegrass", + "default:junglegrass", + "default:junglegrass" + } }) - 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", "" } - }, + minetest.register_craft({ + type = "shapeless", + output = 'homedecor:plastic_base 3', + recipe = { "default:dry_shrub", + "default:dry_shrub", + "default:dry_shrub" + }, }) - minetest.register_craft( { - output = "pipeworks:grating 2", - recipe = { - { "default:steel_ingot", "", "default:steel_ingot" }, - { "", "default:steel_ingot", "" }, - { "default:steel_ingot", "", "default:steel_ingot" } - }, + minetest.register_craft({ + type = "shapeless", + output = 'homedecor:plastic_base 4', + recipe = { "default:leaves", + "default:leaves", + "default:leaves", + "default:leaves", + "default:leaves", + "default:leaves" + } }) - minetest.register_craft( { - output = "pipeworks:spigot 3", - recipe = { - { "pipeworks:pipe_110000_empty", "" }, - { "", "pipeworks:pipe_110000_empty" }, - }, + minetest.register_craft({ + type = "cooking", + output = "homedecor:plastic_sheeting", + recipe = "homedecor:plastic_base", + }) + + 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( { output = "pipeworks:tube 12", recipe = { @@ -146,23 +218,6 @@ if io.open(minetest.get_modpath("pipeworks").."/../technic/init.lua", "r") == ni { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" } }, }) +end - 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:entry_panel 2", - recipe = { - { "", "default:steel_ingot", "" }, - { "", "pipeworks:pipe_110000_empty", "" }, - { "", "default:steel_ingot", "" }, - }, - }) - -end diff --git a/textures/homedecor_plastic_base.png b/textures/homedecor_plastic_base.png new file mode 100644 index 0000000000000000000000000000000000000000..4d0e3f258ba900b829a2e272b0cb98b6795db32c GIT binary patch literal 419 zcmV;U0bKrxP)7_wb%)I2`!b zAJ%L(v%}%gzTM;T*gpFc&&()_tm8OTDiy4?9FIqKyB*zbmo!ajG#cVtKpe;Re!r7t z8A>Ud%_dSxlu{UDIGs+kTCMk-^D#V~PVM9IpkA-z`#!Z=4JjpBYh2f5zu&XjYzV{9 zJ_Q^O2aGYqaZI^frdq9{wdQ<2lOzd32s)h(uIuszFrUxuU@)LmD$#DY34(y4D7ap) zIF7^ZcEj^L@;pZf!DKSYJ^`eZgkgwM3Z)c9Q4mEDNs_SLZt*;i%jLpqwL)u+l=9_E ziHpU;0<70-q?Gh}J@Pzfxm@D=KE@b=ARtXs`u)E6@is=Ik^S|-y#f;1ggIVAO5Okf N002ovPDHLkV1kqFwqO7N literal 0 HcmV?d00001 diff --git a/textures/homedecor_plastic_base_inv.png b/textures/homedecor_plastic_base_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..3a02005da55493489dd1f75684be3164d37f3b64 GIT binary patch literal 561 zcmV-10?z%3P)l{Scp zF)b<`id5)Y$ROzt=uc|5mbQzCtMp%V>FD6-)JeoHDg;GK8XBQ#J~U}Rhs*U|uHNx( z_n97eIS*%e;eY;p&d<-))zy_6kH_k}yY@GzR;%IrK91vHnkGRIAf@E>^_5nu^~vS_ z1YOr-Cz4hX-b}8P#g_b3p%D z?(grJ&*vmb!tL!XrfG6;aDZ*w#Bq%8`)Ha*yGG)?31@bH&GKA%Sj!R6&8g+hTsp+J^pTwh<~`#w)k zPZ);5YPI6#<_6og5khcsa-y{1aHyKiCKneM93LM8Fr7{jLeOY5kWw<4OemE~BuT>F z-X38X^7#1p!v>(=?<>o)C>DzZL4e~ptk-L#ln5cPEQ`frfn`~krpfd3GijQ#TrR(V zq~Fu)^;9mGLn%e4)6oWlf!f;IVzb%MZnw1$(J#vV4Lc)R00000NkvXXu0mjfqk#tx literal 0 HcmV?d00001 diff --git a/textures/homedecor_plastic_sheeting.png b/textures/homedecor_plastic_sheeting.png new file mode 100644 index 0000000000000000000000000000000000000000..810ea2aa36bf372822035dda39af75f15334b429 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#4jVU-U|r9h1MVUd?{ q+etLVF0xGenpFO#UB5i|A21isa!OBlrELzhkipZ{&t;ucLK6VmwLl*L literal 0 HcmV?d00001 -- 2.30.2