Fix recipe, use less lava

This commit is contained in:
Evert Prants 2018-04-06 17:04:21 +03:00
parent 9ba9131c75
commit 9d728b38f6
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 11 additions and 8 deletions

View File

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

View File

@ -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
-- 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
-- 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 = {
ingot = 144,
crystal = 144,
@ -310,7 +313,7 @@ local function melter_node_timer(pos, elapsed)
local metal_name = fluidity.molten_metals[mt]
if metal_name and (metal == "" or metal == metal_name) then
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
metal = metal_name
metal_count = metal_count + cnt