Skip to content

Commit

Permalink
Fix registered_craftitems not populated in async env
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Aug 14, 2023
1 parent f9c881e commit f6bddc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/async/game.lua
Expand Up @@ -37,7 +37,7 @@ do
-- Reassemble the other tables
if v.type == "node" then
all.registered_nodes[k] = v
elseif v.type == "craftitem" then
elseif v.type == "craft" then
all.registered_craftitems[k] = v
elseif v.type == "tool" then
all.registered_tools[k] = v
Expand Down
2 changes: 2 additions & 0 deletions games/devtest/mods/unittests/inside_async_env.lua
Expand Up @@ -14,6 +14,8 @@ local function do_tests()
assert(type(meta) == "userdata")
assert(type(meta.set_tool_capabilities) == "function")
assert(core.registered_items[""])
assert(next(core.registered_nodes) ~= nil)
assert(core.registered_craftitems["unittests:stick"])
-- alias handling
assert(core.registered_items["unittests:steel_ingot_alias"].name ==
"unittests:steel_ingot")
Expand Down

0 comments on commit f6bddc4

Please sign in to comment.