mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53: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
|
### List of APIs available in an async environment
|
||||||
|
|
||||||
Classes:
|
Classes:
|
||||||
|
* `AreaStore`
|
||||||
* `ItemStack`
|
* `ItemStack`
|
||||||
* `PerlinNoise`
|
* `PerlinNoise`
|
||||||
* `PerlinNoiseMap`
|
* `PerlinNoiseMap`
|
||||||
|
@ -10,6 +10,9 @@ local function do_tests()
|
|||||||
assert(not core.object_refs)
|
assert(not core.object_refs)
|
||||||
-- stuff that should be here
|
-- stuff that should be here
|
||||||
assert(ItemStack)
|
assert(ItemStack)
|
||||||
|
local meta = ItemStack():get_meta()
|
||||||
|
assert(type(meta) == "userdata")
|
||||||
|
assert(type(meta.set_tool_capabilities) == "function")
|
||||||
assert(core.registered_items[""])
|
assert(core.registered_items[""])
|
||||||
-- alias handling
|
-- alias handling
|
||||||
assert(core.registered_items["unittests:steel_ingot_alias"].name ==
|
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)
|
void ServerScripting::InitializeAsync(lua_State *L, int top)
|
||||||
{
|
{
|
||||||
// classes
|
// classes
|
||||||
|
ItemStackMetaRef::Register(L);
|
||||||
|
LuaAreaStore::Register(L);
|
||||||
LuaItemStack::Register(L);
|
LuaItemStack::Register(L);
|
||||||
LuaPerlinNoise::Register(L);
|
LuaPerlinNoise::Register(L);
|
||||||
LuaPerlinNoiseMap::Register(L);
|
LuaPerlinNoiseMap::Register(L);
|
||||||
|
Loading…
Reference in New Issue
Block a user