From 2771ec12f530d3a4e536e122fde276b86b1a15f1 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Wed, 15 Jul 2020 17:26:57 +0200 Subject: [PATCH] Remove cache_fuel() --- init.lua | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/init.lua b/init.lua index fb05245..f8ccce6 100644 --- a/init.lua +++ b/init.lua @@ -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