Skip to content

Commit

Permalink
Code format - (Clang-format)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
1 parent c2e7443 commit 0821470
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/lua/functions/core/game/game_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,26 +996,26 @@ int GameFunctions::luaGameGetAchievements(lua_State* L) {
}

int luaGameGetOutfits(lua_State* L) {
// Game.getOutfits()
lua_createtable(L, 0, 0);

const auto &maleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_MALE);
int index = 0;
for (const auto &outfit : maleOutfits) {
lua_createtable(L, 0, 3);
Lua::setField(L, "id", outfit->lookType);
Lua::setField(L, "name", outfit->name);
Lua::setField(L, "sex", PLAYERSEX_MALE);
lua_rawseti(L, -2, ++index);
}

const auto &femaleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_FEMALE);
for (const auto &outfit : femaleOutfits) {
lua_createtable(L, 0, 3);
Lua::setField(L, "id", outfit->lookType);
Lua::setField(L, "name", outfit->name);
Lua::setField(L, "sex", PLAYERSEX_FEMALE);
lua_rawseti(L, -2, ++index);
}
return 1;
// Game.getOutfits()
lua_createtable(L, 0, 0);

const auto &maleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_MALE);
int index = 0;
for (const auto &outfit : maleOutfits) {
lua_createtable(L, 0, 3);
Lua::setField(L, "id", outfit->lookType);
Lua::setField(L, "name", outfit->name);
Lua::setField(L, "sex", PLAYERSEX_MALE);
lua_rawseti(L, -2, ++index);
}

const auto &femaleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_FEMALE);
for (const auto &outfit : femaleOutfits) {
lua_createtable(L, 0, 3);
Lua::setField(L, "id", outfit->lookType);
Lua::setField(L, "name", outfit->name);
Lua::setField(L, "sex", PLAYERSEX_FEMALE);
lua_rawseti(L, -2, ++index);
}
return 1;
}

0 comments on commit 0821470

Please sign in to comment.