refactor: complete 'lua' namespace use

This commit is contained in:
MihailRis
2024-06-11 13:51:11 +03:00
parent 90bc86408b
commit 913e5983b1
26 changed files with 370 additions and 359 deletions
+4 -4
View File
@@ -5,7 +5,7 @@
using namespace scripting;
static int l_item_name(lua_State* L) {
static int l_item_name(lua::State* L) {
auto indices = content->getIndices();
auto id = lua::tointeger(L, 1);
if (static_cast<size_t>(id) >= indices->countItemDefs()) {
@@ -15,12 +15,12 @@ static int l_item_name(lua_State* L) {
return lua::pushstring(L, def->name);
}
static int l_item_index(lua_State* L) {
static int l_item_index(lua::State* L) {
auto name = lua::require_string(L, 1);
return lua::pushinteger(L, content->requireItem(name).rt.id);
}
static int l_item_stack_size(lua_State* L) {
static int l_item_stack_size(lua::State* L) {
auto indices = content->getIndices();
auto id = lua::tointeger(L, 1);
if (static_cast<size_t>(id) >= indices->countItemDefs()) {
@@ -30,7 +30,7 @@ static int l_item_stack_size(lua_State* L) {
return lua::pushinteger(L, def->stackSize);
}
static int l_item_defs_count(lua_State* L) {
static int l_item_defs_count(lua::State* L) {
return lua::pushinteger(L, indices->countItemDefs());
}