diff --git a/minerdream/config.lua b/minerdream/config.lua index 57a60e3..2c871a2 100644 --- a/minerdream/config.lua +++ b/minerdream/config.lua @@ -4,6 +4,7 @@ local viscosity=1 minerdream.ingot_stack_max = minetest.settings:get("minerdream.ingot_stack_max") or 250 minerdream.lump_stack_max = minetest.settings:get("minerdream.lump_stack_max") or 999 minerdream.dust_cooking_time_reduce = minetest.settings:get("minerdream.dust_cooking_time_reduce") or 2 +minerdream.smelter_refractory_duration = minetest.settings:get("minerdream.smelter_refractory_duration") or 5000 minerdream.steel_wire="minerdream:steel_wire" if minetest.get_modpath("basic_materials") == nil then diff --git a/minerdream/settingtypes.txt b/minerdream/settingtypes.txt index 4097996..ea6b9b2 100644 --- a/minerdream/settingtypes.txt +++ b/minerdream/settingtypes.txt @@ -1,3 +1,4 @@ minerdream.ingot_stack_max (Max stack for ingots) int 250 99 1000 minerdream.lump_stack_max (Max stack for lumps) int 999 99 1000 minerdream.dust_cooking_time_reduce (Recucing factor for cooking dust instead of lump) float 2 1 5 +minerdream.smelter_refractory_duration (Smelting time the refractory lasts) int 6000 600 50000 diff --git a/minerdream/smelter.lua b/minerdream/smelter.lua index ae4d53a..d120f31 100644 --- a/minerdream/smelter.lua +++ b/minerdream/smelter.lua @@ -164,7 +164,7 @@ local function smelter_node_timer(pos, elapsed) -- is refrac slot filled or empty? if not inv:is_empty("refrac") and (refraclist[1]:get_name() == "default:clay_brick") then inv:remove_item("refrac",ItemStack("default:clay_brick")) - refrac_time=refrac_time + 6000 + refrac_time=refrac_time + minerdream.smelter_refractory_duration else cookable = false end @@ -233,8 +233,9 @@ local function smelter_node_timer(pos, elapsed) local formspec local item_state local item_percent = 0 + local refrac_percent = 0 if cookable then - refrac_percent = math.floor (refrac_time / 60) + refrac_percent = math.min(100, math.floor (refrac_time / minerdream.smelter_refractory_duration * 100)) item_percent = math.floor(src_time / cooked.time * 100) if item_percent > 100 then item_state = "100% (output full)" @@ -266,7 +267,7 @@ local function smelter_node_timer(pos, elapsed) fuel_state = "0%" end formspec = M.get_smelter_inactive_formspec() - swap_node(pos, "default:smelter") + swap_node(pos, "minerdream:smelter") -- stop timer on the inactive furnace minetest.get_node_timer(pos):stop() end