1
0
Fork 0

Merge pull request 'Properly fix smokers, & blast_furnaces to work at twice the rate of a furnace.' (#2344) from fix_blast_furnaces_and_smokers_properly into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2344
Reviewed-by: cora <cora@noreply.git.minetest.land>
wood_api
cora 2022-06-21 10:32:15 +00:00
commit 432ec760b7
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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)