Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Fix missing recipes (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbith committed Sep 30, 2019
1 parent 94637c6 commit 9e48e9e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ local after = core.after
local clr = core.colorize
local reg_tools = core.registered_tools
local reg_items = core.registered_items
local reg_alias = core.registered_aliases
local show_formspec = core.show_formspec
local reg_aliases = core.registered_aliases
local globalstep = core.register_globalstep
local on_shutdown = core.register_on_shutdown
local get_players = core.get_connected_players
Expand Down Expand Up @@ -958,20 +958,6 @@ local function get_init_items()
local c = 0
for name, def in pairs(reg_items) do
if show_item(def) then
local old_name = reg_alias[name]
if old_name then
local old_recipes = recipes_cache[old_name]
local old_usages = usages_cache[old_name]

if old_recipes then
recipes_cache[name] = old_recipes
end

if old_usages then
usages_cache[name] = old_usages
end
end

if not fuel_cache[name] then
cache_fuel(name)
end
Expand All @@ -989,6 +975,20 @@ local function get_init_items()
end
end

for name in pairs(reg_aliases) do
local def = reg_items[name]
if def and show_item(def) then
if not recipes_cache[name] then
cache_recipes(name)
end

if recipes_cache[name] then
c = c + 1
init_items[c] = name
end
end
end

sort(init_items)
end

Expand Down

0 comments on commit 9e48e9e

Please sign in to comment.