format: reformat project

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov
2024-08-03 19:53:48 +03:00
committed by Pugemon
parent 736cd175d5
commit bbf33e8e4d
202 changed files with 7389 additions and 5609 deletions
+4 -6
View File
@@ -1,7 +1,6 @@
#include "api_lua.hpp"
#include "../../../content/Content.hpp"
#include "../../../items/ItemDef.hpp"
#include "api_lua.hpp"
using namespace scripting;
@@ -45,17 +44,16 @@ static int l_item_get_icon(lua::State* L) {
case item_icon_type::sprite:
return lua::pushstring(L, def->icon);
case item_icon_type::block:
return lua::pushstring(L, "block-previews:"+def->icon);
return lua::pushstring(L, "block-previews:" + def->icon);
}
}
return 0;
}
const luaL_Reg itemlib [] = {
const luaL_Reg itemlib[] = {
{"index", lua::wrap<l_item_index>},
{"name", lua::wrap<l_item_name>},
{"stack_size", lua::wrap<l_item_stack_size>},
{"defs_count", lua::wrap<l_item_defs_count>},
{"icon", lua::wrap<l_item_get_icon>},
{NULL, NULL}
};
{NULL, NULL}};