Remove cache_fuel()

This commit is contained in:
Jean-Patrick Guerrero 2020-07-15 17:26:57 +02:00
parent bba7dd81b9
commit 2771ec12f5
1 changed files with 0 additions and 16 deletions

View File

@ -29,7 +29,6 @@ local show_formspec = core.show_formspec
local globalstep = core.register_globalstep
local on_shutdown = core.register_on_shutdown
local get_players = core.get_connected_players
local get_craft_result = core.get_craft_result
local translate = minetest.get_translated_string
local on_joinplayer = core.register_on_joinplayer
local get_all_recipes = core.get_all_craft_recipes
@ -560,17 +559,6 @@ local function get_filtered_items(player, data)
return items
end
local function get_burntime(item)
return get_craft_result{method = "fuel", items = {item}}.time
end
local function cache_fuel(item)
local burntime = get_burntime(item)
if burntime > 0 then
fuel_cache[item] = burntime
end
end
local function show_item(def)
return def and not (def.groups.not_in_craft_guide == 1 or
def.groups.not_in_creative_inventory == 1) and
@ -1546,10 +1534,6 @@ local function get_init_items()
if name ~= "" and show_item(def) then
cache_drops(name, def.drop)
if not fuel_cache[name] then
cache_fuel(name)
end
if not recipes_cache[name] then
cache_recipes(name)
end