add sawdust and tree/wood grindings with arcacia tree for dye and provide a better alternative rubbertree->latex path that yields the same as the tree tap, but requires more machine work

yet without textures
This commit is contained in:
Tim 2015-01-30 04:52:29 +01:00
parent 80f79f5e1e
commit 56e96b2593
4 changed files with 67 additions and 8 deletions

View File

@ -10,14 +10,10 @@ function technic.register_separating_recipe(data)
technic.register_recipe("separating", data)
end
local rubber_tree_planks = minetest.get_modpath("moretrees") and "moretrees:rubber_tree_planks" or "default:wood"
local recipes = {
{ "technic:bronze_dust 4", "technic:copper_dust 3", "technic:tin_dust" },
{ "technic:stainless_steel_dust 4", "technic:wrought_iron_dust 3", "technic:chromium_dust" },
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
{ "moretrees:rubber_tree_trunk_empty", rubber_tree_planks.." 4", "technic:raw_latex" },
{ "moretrees:rubber_tree_trunk", rubber_tree_planks.." 4", "technic:raw_latex" },
}
local function uranium_dust(p)

View File

@ -11,8 +11,6 @@ end
local recipes = {
-- Rubber
{"technic:raw_latex", "technic:rubber 3"},
{"moretrees:rubber_tree_trunk_empty", "technic:rubber"},
{"moretrees:rubber_tree_trunk", "technic:rubber"},
}
for _, data in pairs(recipes) do
@ -38,8 +36,6 @@ if minetest.get_modpath("dye") then
{"flowers:viola", "dye:violet 4"},
{"bushes:blackberry", unifieddyes and "unifieddyes:magenta_s50 4" or "dye:violet 4"},
{"bushes:blueberry", unifieddyes and "unifieddyes:magenta_s50 4" or "dye:magenta 4"},
-- https://en.wikipedia.org/wiki/Catechu ancient brown dye from the wood of acacia trees
{"moretrees:acacia_trunk", "dye:brown 8"},
}
for _, data in ipairs(dye_recipes) do

View File

@ -0,0 +1,64 @@
local S = technic.getter
local moretrees = minetest.get_modpath("moretrees")
local mesecons_materials = minetest.get_modpath("mesecons_materials")
local dye = minetest.get_modpath("dye")
-- sawdust, the finest wood/tree grinding
local sawdust = "technic:sawdust"
minetest.register_craftitem(sawdust, {
description = S("Sawdust"),
inventory_image = "technic_sawdust.png",
on_place_on_ground = minetest.craftitem_place_item,
})
minetest.register_craft({ type = "fuel", recipe = sawdust, burntime = 6 })
technic.register_compressor_recipe({ input = {sawdust .. " 4"}, output = "default:wood" })
-- tree/wood grindings
local function register_tree_grinding(name, tree, wood, extract, grinding_color)
local lname = string.lower(name)
lname = string.gsub(lname, ' ', '_')
local grindings_name = "technic:"..lname.."_grindings"
local inventory_image = "technic_"..lname.."_grindings.png"
if grinding_color then
inventory_image = inventory_image .. "^[colorize:" .. grinding_color
end
minetest.register_craftitem(grindings_name, {
description = S("%s Grinding"):format(S(name)),
inventory_image = inventory_image,
on_place_on_ground = minetest.craftitem_place_item,
})
minetest.register_craft({
type = "fuel",
recipe = grindings_name,
burntime = 8,
})
technic.register_grinder_recipe({ input = { tree }, output = grindings_name .. " 4" })
technic.register_grinder_recipe({ input = { grindings_name }, output = sawdust .. " 4" })
if wood then
technic.register_grinder_recipe({ input = { wood }, output = grindings_name })
end
if extract then
technic.register_extractor_recipe({ input = { grindings_name .. " 4" }, output = extract})
technic.register_separating_recipe({
input = { grindings_name .. " 4" },
output = { sawdust .. " 4", extract }
})
end
end
local rubber_tree_planks = moretrees and "moretrees:rubber_tree_planks"
local default_extract = dye and "dye:brown 2"
local grinding_recipes = {
{"Common Tree", "group:tree", "group:wood", default_extract },
{"Rubber Tree", "moretrees:rubber_tree_trunk", rubber_tree_planks, "technic:raw_latex"}
}
for _, data in pairs(grinding_recipes) do
register_tree_grinding(unpack(data))
end
if moretrees and dye then
-- https://en.wikipedia.org/wiki/Catechu ancient brown dye from the wood of acacia trees
register_tree_grinding("Acacia", "moretrees:acacia_trunk", "moretrees:acacia_planks", "dye:brown 8")
end

View File

@ -21,6 +21,9 @@ dofile(path.."/extractor_recipes.lua")
dofile(path.."/compressor_recipes.lua")
dofile(path.."/centrifuge_recipes.lua")
-- Multi-Machine Recipes
dofile(path.."/grindings.lua")
-- Machines
dofile(path.."/alloy_furnace.lua")
dofile(path.."/electric_furnace.lua")