diff options
Diffstat (limited to 'src/script/cpp_api/s_entity.cpp')
-rw-r--r-- | src/script/cpp_api/s_entity.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/script/cpp_api/s_entity.cpp b/src/script/cpp_api/s_entity.cpp index 8e79f8838..ab8c6ee95 100644 --- a/src/script/cpp_api/s_entity.cpp +++ b/src/script/cpp_api/s_entity.cpp @@ -31,8 +31,8 @@ bool ScriptApiEntity::luaentity_Add(u16 id, const char *name) verbosestream<<"scriptapi_luaentity_add: id="<<id<<" name=\"" <<name<<"\""<<std::endl; - // Get minetest.registered_entities[name] - lua_getglobal(L, "minetest"); + // Get core.registered_entities[name] + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_entities"); luaL_checktype(L, -1, LUA_TTABLE); lua_pushstring(L, name); @@ -62,8 +62,8 @@ bool ScriptApiEntity::luaentity_Add(u16 id, const char *name) luaL_typerror(L, -1, "ObjectRef"); lua_setfield(L, -2, "object"); - // minetest.luaentities[id] = object - lua_getglobal(L, "minetest"); + // core.luaentities[id] = object + lua_getglobal(L, "core"); lua_getfield(L, -1, "luaentities"); luaL_checktype(L, -1, LUA_TTABLE); lua_pushnumber(L, id); // Push id @@ -80,7 +80,7 @@ void ScriptApiEntity::luaentity_Activate(u16 id, verbosestream << "scriptapi_luaentity_activate: id=" << id << std::endl; - // Get minetest.luaentities[id] + // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); @@ -106,8 +106,8 @@ void ScriptApiEntity::luaentity_Remove(u16 id) verbosestream << "scriptapi_luaentity_rm: id=" << id << std::endl; - // Get minetest.luaentities table - lua_getglobal(L, "minetest"); + // Get core.luaentities table + lua_getglobal(L, "core"); lua_getfield(L, -1, "luaentities"); luaL_checktype(L, -1, LUA_TTABLE); int objectstable = lua_gettop(L); @@ -117,7 +117,7 @@ void ScriptApiEntity::luaentity_Remove(u16 id) lua_pushnil(L); lua_settable(L, objectstable); - lua_pop(L, 2); // pop luaentities, minetest + lua_pop(L, 2); // pop luaentities, core } std::string ScriptApiEntity::luaentity_GetStaticdata(u16 id) @@ -126,7 +126,7 @@ std::string ScriptApiEntity::luaentity_GetStaticdata(u16 id) //infostream<<"scriptapi_luaentity_get_staticdata: id="<<id<<std::endl; - // Get minetest.luaentities[id] + // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); @@ -157,7 +157,7 @@ void ScriptApiEntity::luaentity_GetProperties(u16 id, //infostream<<"scriptapi_luaentity_get_properties: id="<<id<<std::endl; - // Get minetest.luaentities[id] + // Get core.luaentities[id] luaentity_get(L, id); // Set default values that differ from ObjectProperties defaults @@ -196,7 +196,7 @@ void ScriptApiEntity::luaentity_Step(u16 id, float dtime) //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; - // Get minetest.luaentities[id] + // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // State: object is at top of stack @@ -225,7 +225,7 @@ void ScriptApiEntity::luaentity_Punch(u16 id, //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; - // Get minetest.luaentities[id] + // Get core.luaentities[id] luaentity_get(L,id); int object = lua_gettop(L); // State: object is at top of stack @@ -255,7 +255,7 @@ void ScriptApiEntity::luaentity_Rightclick(u16 id, //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; - // Get minetest.luaentities[id] + // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // State: object is at top of stack |