From 8c8de4a2fbb7664b1087069f6a27a5df30ea8739 Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Mon, 7 May 2018 00:48:11 +0300 Subject: seed count fix --- technic/tools/planter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/technic/tools/planter.lua b/technic/tools/planter.lua index b8a4f67..c5a22ba 100644 --- a/technic/tools/planter.lua +++ b/technic/tools/planter.lua @@ -90,7 +90,7 @@ local function work_on_soil(itemstack, user, pointed_thing) local player_name = user:get_player_name() local inv = user:get_inventory() - if not inv:contains_item("main", ItemStack({name=meta.selected, count = 2*offset+1})) then + if not inv:contains_item("main", ItemStack({name=meta.selected, count = offset + 1})) then minetest.chat_send_player(player_name, S("Not enough " .. meta.selected .. " to continue!")) return itemstack end -- cgit v1.2.3 From 05deb34779b083ce93583b774636331d7b2549bc Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Mon, 7 May 2018 06:51:53 +0300 Subject: backed clay support --- extranodes/init.lua | 9 ++++ technic/machines/LV/cnc_nodes.lua | 64 +++++++++++++++++++++-------- technic/machines/register/alloy_recipes.lua | 20 +++++++-- 3 files changed, 74 insertions(+), 19 deletions(-) diff --git a/extranodes/init.lua b/extranodes/init.lua index 44d3dc1..118dc0a 100644 --- a/extranodes/init.lua +++ b/extranodes/init.lua @@ -10,6 +10,15 @@ dofile(path.."/trampoline.lua") dofile(path.."/extratubes.lua") dofile(path.."/lox.lua") +if minetest.get_modpath("bakedclay") then + -- bring back them sticks + minetest.register_craft( { + type = "shapeless", + output = "default:stick", + recipe = {"default:dry_shrub"} + }) +end + if minetest.get_modpath("moreblocks") then -- register stairsplus/circular_saw nodes diff --git a/technic/machines/LV/cnc_nodes.lua b/technic/machines/LV/cnc_nodes.lua index d17ceab..e6c586f 100644 --- a/technic/machines/LV/cnc_nodes.lua +++ b/technic/machines/LV/cnc_nodes.lua @@ -368,22 +368,24 @@ if minetest.get_modpath("moreblocks") then {"moreblocks_copperpatina.png"}, S("Copper Patina")) - -- Clay - ------------ - technic.cnc.register_all("bakedclay:red", - {cracky=3, not_in_creative_inventory=1}, - {"baked_clay_red.png"}, - S("Red Clay")) - - technic.cnc.register_all("bakedclay:orange", - {cracky=3, not_in_creative_inventory=1}, - {"baked_clay_orange.png"}, - S("Orange Clay")) - - technic.cnc.register_all("bakedclay:grey", - {cracky=3, not_in_creative_inventory=1}, - {"baked_clay_grey.png"}, - S("Grey Clay")) + if not minetest.get_modpath("bakedclay") then + -- Clay + ------------ + technic.cnc.register_all("bakedclay:red", + {cracky=3, not_in_creative_inventory=1}, + {"baked_clay_red.png"}, + S("Red Clay")) + + technic.cnc.register_all("bakedclay:orange", + {cracky=3, not_in_creative_inventory=1}, + {"baked_clay_orange.png"}, + S("Orange Clay")) + + technic.cnc.register_all("bakedclay:grey", + {cracky=3, not_in_creative_inventory=1}, + {"baked_clay_grey.png"}, + S("Grey Clay")) + end end @@ -393,4 +395,34 @@ if minetest.get_modpath("maple") then {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1}, {"maple_wood.png"}, S("Maple")) +end + + +if minetest.get_modpath("bakedclay") then + + local clay = { + {"white", "White"}, + {"grey", "Grey"}, + {"black", "Black"}, + {"red", "Red"}, + {"yellow", "Yellow"}, + {"green", "Green"}, + {"cyan", "Cyan"}, + {"blue", "Blue"}, + {"magenta", "Magenta"}, + {"orange", "Orange"}, + {"violet", "Violet"}, + {"brown", "Brown"}, + {"pink", "Pink"}, + {"dark_grey", "Dark Grey"}, + {"dark_green", "Dark Green"}, + } + + for _,c in ipairs(clay) do + technic.cnc.register_all("bakedclay:" .. c[1], + {cracky=3, not_in_creative_inventory=1}, + {"baked_clay_" .. c[1] .. ".png"}, + S(c[2] .. " Clay")) + end + end \ No newline at end of file diff --git a/technic/machines/register/alloy_recipes.lua b/technic/machines/register/alloy_recipes.lua index 91e68f2..633e878 100644 --- a/technic/machines/register/alloy_recipes.lua +++ b/technic/machines/register/alloy_recipes.lua @@ -32,16 +32,30 @@ local recipes = { } if minetest.get_modpath("ethereal") then - table.insert(recipes, {"default:clay", "dye:red", "bakedclay:red"}) - table.insert(recipes, {"default:clay", "dye:orange", "bakedclay:orange"}) - table.insert(recipes, {"default:clay", "dye:grey", "bakedclay:grey"}) table.insert(recipes, {"ethereal:crystal_spike", "ethereal:fire_dust 2", "default:mese_crystal 2"}) + if not minetest.get_modpath("bakedclay") then + table.insert(recipes, {"default:clay", "dye:red", "bakedclay:red"}) + table.insert(recipes, {"default:clay", "dye:orange", "bakedclay:orange"}) + table.insert(recipes, {"default:clay", "dye:grey", "bakedclay:grey"}) + end if minetest.get_modpath("bonemeal") then table.insert(recipes, {"default:sand", "bonemeal:mulch", "ethereal:sandy 2"}) table.insert(recipes, {"default:sand", "bonemeal:bonemeal", "ethereal:sandy"}) end end +if minetest.get_modpath("bakedclay") then + + local clay = {"white", "grey", "black", "red", "yellow", + "green", "cyan", "blue", "magenta", "orange", + "violet", "brown", "pink", "dark_grey", "dark_green"} + + for _,c in ipairs(clay) do + table.insert(recipes, {"default:clay 8", "dye:" .. c, "bakedclay:" .. c}) + end + +end + for _, data in pairs(recipes) do technic.register_alloy_recipe({input = {data[1], data[2]}, output = data[3], time = data[4]}) end -- cgit v1.2.3