From f6599d237ebe47f91192bf0f6e734edbc094b3c2 Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Tue, 21 Jun 2022 00:36:13 -0500 Subject: [PATCH] Fix smokers, & blast_furnaces to work at twice the rate of a furnace. --- mods/ITEMS/mcl_blast_furnace/init.lua | 8 ++++---- mods/ITEMS/mcl_smoker/init.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mods/ITEMS/mcl_blast_furnace/init.lua b/mods/ITEMS/mcl_blast_furnace/init.lua index 168c28bd5..b8bbe001f 100644 --- a/mods/ITEMS/mcl_blast_furnace/init.lua +++ b/mods/ITEMS/mcl_blast_furnace/init.lua @@ -288,7 +288,8 @@ local function blast_furnace_node_timer(pos, elapsed) -- Cooking -- - local el = elapsed_game_time + -- Run the blast_furnace at twice the speed of a furnace. + local el = elapsed_game_time * 2 -- Check if we have cookable content: cookable local aftercooked @@ -329,13 +330,12 @@ local function blast_furnace_node_timer(pos, elapsed) elseif active then el = math.min(el, fuel_totaltime - fuel_time) -- The furnace is currently active and has enough fuel - fuel_time = (fuel_time + el) *2 --multiply speed of fuel consumption to match proper output + fuel_time = fuel_time + el end -- If there is a cookable item then check if it is ready yet if cookable and active then - -- In the src_time variable, the *2 is the multiplication that makes the blast furnace work faster than a normal furnace. - src_time = (src_time + el)*2 + src_time = src_time + el -- Place result in dst list if done if src_time >= cooked.time then inv:add_item("dst", cooked.item) diff --git a/mods/ITEMS/mcl_smoker/init.lua b/mods/ITEMS/mcl_smoker/init.lua index e45a2712c..696df4917 100644 --- a/mods/ITEMS/mcl_smoker/init.lua +++ b/mods/ITEMS/mcl_smoker/init.lua @@ -288,7 +288,8 @@ local function smoker_node_timer(pos, elapsed) -- Cooking -- - local el = elapsed_game_time + -- Run the smoker at twice the speed of a furnace. + local el = elapsed_game_time * 2 -- Check if we have cookable content: cookable local aftercooked @@ -329,13 +330,12 @@ local function smoker_node_timer(pos, elapsed) elseif active then el = math.min(el, fuel_totaltime - fuel_time) -- The furnace is currently active and has enough fuel - fuel_time = ( fuel_time + el ) * 2 + fuel_time = fuel_time + el end -- If there is a cookable item then check if it is ready yet if cookable and active then - -- In the src_time variable, the *2 is the multiplication that makes the smoker work faster than a normal furnace. - src_time = (src_time + el)*2 + src_time = src_time + el -- Place result in dst list if done if src_time >= cooked.time then inv:add_item("dst", cooked.item)