Fix recipe, use less lava

This commit is contained in:
Evert 2018-04-06 17:04:21 +03:00
parent 9ba9131c75
commit 9d728b38f6
No known key found for this signature in database
GPG Key ID: 1688DA83D222D0B5
2 changed files with 11 additions and 8 deletions

@ -89,9 +89,9 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = 'metal_melter:heat_gravel 4', output = 'metal_melter:heat_gravel 4',
recipe = { recipe = {
{'default:sand', 'default:sand', 'default:sand'}, {'default:sand', 'default:gravel', 'default:sand'},
{'default:gravel', 'default:clay', 'default:gravel'}, {'default:gravel', 'default:clay', 'default:gravel'},
{'default:sand', 'default:sand', 'default:sand'}, {'default:sand', 'default:gravel', 'default:sand'},
}, },
}) })

@ -1,12 +1,15 @@
-- Melts metals using lava as a heat source -- Melts metals using lava as a heat source.
-- Max lava that can be held by the melter -- Max lava that can be held by the melter.
metal_melter.max_fuel = 8000 metal_melter.max_fuel = 8000
-- Max metal that can be held by the melter -- Spec divided by this number is the lava usage.
metal_melter.lava_usage = 4
-- Max metal that can be held by the melter.
metal_melter.max_metal = 16000 metal_melter.max_metal = 16000
-- How much metal is given for melting a typename (in millibuckets) -- How much metal is given for melting a typename (in millibuckets).
metal_melter.spec = { metal_melter.spec = {
ingot = 144, ingot = 144,
crystal = 144, crystal = 144,
@ -310,7 +313,7 @@ local function melter_node_timer(pos, elapsed)
local metal_name = fluidity.molten_metals[mt] local metal_name = fluidity.molten_metals[mt]
if metal_name and (metal == "" or metal == metal_name) then if metal_name and (metal == "" or metal == metal_name) then
local cnt = metal_melter.spec[t] local cnt = metal_melter.spec[t]
local heat_consume = math.floor(cnt / 2) local heat_consume = math.floor(cnt / metal_melter.lava_usage)
if metal_count + cnt <= metal_melter.max_metal and heat_count >= heat_consume then if metal_count + cnt <= metal_melter.max_metal and heat_count >= heat_consume then
metal = metal_name metal = metal_name
metal_count = metal_count + cnt metal_count = metal_count + cnt