summaryrefslogtreecommitdiff
path: root/technic/machines/register/compressor_recipes.lua
blob: 021c393a8bdbeaaa062156430ad3fd0581baa0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

local S = technic.getter

technic.register_recipe_type("compressing", { description = S("Compressing") })

function technic.register_compressor_recipe(data)
	data.time = data.time or 4
	technic.register_recipe("compressing", data)
end

local recipes = {
	{"default:snowblock",          "default:ice"},
	{"default:sand 2",             "default:sandstone"},
	{"default:silver_sand 2",      "default:silver_sandstone"},
	{"default:desert_sand",        "default:desert_stone"},
	{"technic:mixed_metal_ingot",  "technic:composite_plate"},
	{"default:copper_ingot 5",     "technic:copper_plate"},
	{"technic:coal_dust 4",        "technic:graphite"},
	{"technic:carbon_cloth",       "technic:carbon_plate"},
	{"technic:uranium35_ingot 5",  "technic:uranium_fuel"},
	{"technic:diamond_seed 25",    "default:diamond"}
}


if minetest.get_modpath("ethereal") then
	
	-- compressing most copious leaves into more compact fuel
	-- this conversion is based on the burn time (1 vs. 10) + some overhead
	table.insert(recipes, {"default:acacia_leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"default:aspen_leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"default:leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"default:jungleleaves 15", "ethereal:charcoal_lump 1"})

	-- the density of charcoal is ~1/10 of coal, otherwise it's pure carbon
	table.insert(recipes, {"ethereal:charcoal_lump 10", "default:coal_lump 1"})
	-- + some leaves which are most often left over in large amounts
	table.insert(recipes, {"ethereal:willow_twig 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"ethereal:redwood_leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"ethereal:frost_leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"ethereal:yellowleaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"ethereal:birch_leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"ethereal:bamboo_leaves 15", "ethereal:charcoal_lump 1"})
	table.insert(recipes, {"ethereal:orange_leaves 15", "ethereal:charcoal_lump 1"})
	
	if minetest.get_modpath("technic_worldgen") or minetest.get_modpath("moretrees") then
		table.insert(recipes, {"moretrees:rubber_tree_leaves 15", "ethereal:charcoal_lump 1"})
	end

end

if minetest.get_modpath("pathv7") then
	table.insert(recipes, {"default:acacia_wood", "pathv7:bridgewood 1"})
	table.insert(recipes, {"default:junglewood", "pathv7:junglewood 1"})
end
	

-- liquid oxygen
table.insert(recipes, {"vessels:steel_bottle", "technic:lox"})


-- defuse the default sandstone recipe, since we have the compressor to take over in a 
-- more realistic manner. It also uses groups instead of proper sand, which is even more 
-- important, given there are many types of sand and sandstone.
-- minetest.clear_craft({
-- 	output = "default:sandstone",
-- 	recipe = {
-- 		{'group:sand', 'group:sand'},
-- 		{'group:sand', 'group:sand'}
-- 	},
-- })
-- 
-- -- provide an alternative recipe for sandstone, which demands the default sand in particular
-- -- the compressing recipe offered by technic is still offering superior performance
-- minetest.register_craft({
-- 	output = "default:sandstone",
-- 	recipe = {
-- 		{'default:sand', 'default:sand'},
-- 		{'default:sand', 'default:sand'}
-- 	},
-- })
-- UPD: the above changes were made obsolete by default game development


for _, data in pairs(recipes) do
	technic.register_compressor_recipe({input = {data[1]}, output = data[2]})
end