mirror of
https://github.com/minetest/minetest.git
synced 2024-11-26 17:43:45 +01:00
Add two missing classes to async environment
This commit is contained in:
parent
16da954bd7
commit
f9c881eb5a
@ -6454,6 +6454,7 @@ This allows you easy interoperability for delegating work to jobs.
|
||||
### List of APIs available in an async environment
|
||||
|
||||
Classes:
|
||||
* `AreaStore`
|
||||
* `ItemStack`
|
||||
* `PerlinNoise`
|
||||
* `PerlinNoiseMap`
|
||||
|
@ -10,6 +10,9 @@ local function do_tests()
|
||||
assert(not core.object_refs)
|
||||
-- stuff that should be here
|
||||
assert(ItemStack)
|
||||
local meta = ItemStack():get_meta()
|
||||
assert(type(meta) == "userdata")
|
||||
assert(type(meta.set_tool_capabilities) == "function")
|
||||
assert(core.registered_items[""])
|
||||
-- alias handling
|
||||
assert(core.registered_items["unittests:steel_ingot_alias"].name ==
|
||||
|
@ -174,6 +174,8 @@ void ServerScripting::InitializeModApi(lua_State *L, int top)
|
||||
void ServerScripting::InitializeAsync(lua_State *L, int top)
|
||||
{
|
||||
// classes
|
||||
ItemStackMetaRef::Register(L);
|
||||
LuaAreaStore::Register(L);
|
||||
LuaItemStack::Register(L);
|
||||
LuaPerlinNoise::Register(L);
|
||||
LuaPerlinNoiseMap::Register(L);
|
||||
|
Loading…
Reference in New Issue
Block a user