1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Improve readability and infos in verbose log (#13828)

This commit is contained in:
sfan5 2023-09-22 18:41:10 +02:00 committed by GitHub
parent 5949172735
commit c3114132d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 26 additions and 51 deletions

View file

@ -29,9 +29,6 @@ bool ScriptApiEntity::luaentity_Add(u16 id, const char *name)
{
SCRIPTAPI_PRECHECKHEADER
verbosestream<<"scriptapi_luaentity_add: id="<<id<<" name=\""
<<name<<"\""<<std::endl;
// Get core.registered_entities[name]
lua_getglobal(L, "core");
lua_getfield(L, -1, "registered_entities");
@ -78,8 +75,6 @@ void ScriptApiEntity::luaentity_Activate(u16 id,
{
SCRIPTAPI_PRECHECKHEADER
verbosestream << "scriptapi_luaentity_activate: id=" << id << std::endl;
int error_handler = PUSH_ERROR_HANDLER(L);
// Get core.luaentities[id]
@ -106,8 +101,6 @@ void ScriptApiEntity::luaentity_Deactivate(u16 id, bool removal)
{
SCRIPTAPI_PRECHECKHEADER
verbosestream << "scriptapi_luaentity_deactivate: id=" << id << std::endl;
int error_handler = PUSH_ERROR_HANDLER(L);
// Get the entity
@ -132,8 +125,6 @@ void ScriptApiEntity::luaentity_Remove(u16 id)
{
SCRIPTAPI_PRECHECKHEADER
verbosestream << "scriptapi_luaentity_rm: id=" << id << std::endl;
// Get core.luaentities table
lua_getglobal(L, "core");
lua_getfield(L, -1, "luaentities");
@ -152,8 +143,6 @@ std::string ScriptApiEntity::luaentity_GetStaticdata(u16 id)
{
SCRIPTAPI_PRECHECKHEADER
//infostream<<"scriptapi_luaentity_get_staticdata: id="<<id<<std::endl;
int error_handler = PUSH_ERROR_HANDLER(L);
// Get core.luaentities[id]
@ -217,8 +206,6 @@ void ScriptApiEntity::luaentity_GetProperties(u16 id,
{
SCRIPTAPI_PRECHECKHEADER
//infostream<<"scriptapi_luaentity_get_properties: id="<<id<<std::endl;
// Get core.luaentities[id]
luaentity_get(L, id);