mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix registered_craftitems not populated in async env
This commit is contained in:
@@ -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
|
||||
|
@@ -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")
|
||||
|
Reference in New Issue
Block a user