Skip to content

Commit

Permalink
delete dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kokekanon committed Jan 3, 2025
1 parent 0d1e9a6 commit f0dcf55
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 284 deletions.
223 changes: 0 additions & 223 deletions data/scripts/talkactions/gm/delete_test_otcr.lua

This file was deleted.

60 changes: 0 additions & 60 deletions src/lua/functions/core/game/game_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "lua/functions/core/game/game_functions.hpp"

#include "creatures/Appearance/attachedeffects/attachedeffects.hpp" // delete before push
#include "core.hpp"
#include "creatures/monsters/monster.hpp"
#include "creatures/monsters/monsters.hpp"
Expand Down Expand Up @@ -108,8 +107,6 @@ void GameFunctions::init(lua_State* L) {
Lua::registerMethod(L, "Game", "getSecretAchievements", GameFunctions::luaGameGetSecretAchievements);
Lua::registerMethod(L, "Game", "getPublicAchievements", GameFunctions::luaGameGetPublicAchievements);
Lua::registerMethod(L, "Game", "getAchievements", GameFunctions::luaGameGetAchievements);

Lua::registerMethod(L, "Game", "getAllAttachedeffects", GameFunctions::getAllAttachedeffects); // delete before push
}

// Game
Expand Down Expand Up @@ -997,60 +994,3 @@ int GameFunctions::luaGameGetAchievements(lua_State* L) {
}
return 1;
}

int GameFunctions::getAllAttachedeffects(lua_State* L) { // delete before push
// Game.getAllAttachedeffects(type)
const std::string type = luaL_checkstring(L, 1);

lua_newtable(L);

if (type == "aura") {
const auto &auras = g_game().attachedeffects->getAuras();
int index = 1;
for (const auto &aura : auras) {
lua_newtable(L);
lua_pushinteger(L, aura->id);
lua_setfield(L, -2, "id");
lua_pushstring(L, aura->name.c_str());
lua_setfield(L, -2, "name");
lua_rawseti(L, -2, index++);
}
} else if (type == "wing") {
const auto &wings = g_game().attachedeffects->getWings();
int index = 1;
for (const auto &wing : wings) {
lua_newtable(L);
lua_pushinteger(L, wing->id);
lua_setfield(L, -2, "id");
lua_pushstring(L, wing->name.c_str());
lua_setfield(L, -2, "name");
lua_rawseti(L, -2, index++);
}
} else if (type == "effect") {
const auto &wings = g_game().attachedeffects->getEffects();
int index = 1;
for (const auto &wing : wings) {
lua_newtable(L);
lua_pushinteger(L, wing->id);
lua_setfield(L, -2, "id");
lua_pushstring(L, wing->name.c_str());
lua_setfield(L, -2, "name");
lua_rawseti(L, -2, index++);
}
} else if (type == "shader") {
const auto &shaders = g_game().attachedeffects->getShaders();
int index = 1;
for (const auto &shader : shaders) {
lua_newtable(L);
lua_pushinteger(L, shader->id);
lua_setfield(L, -2, "id");
lua_pushstring(L, shader->name.c_str());
lua_setfield(L, -2, "name");
lua_rawseti(L, -2, index++);
}
} else {
lua_pushnil(L);
}

return 1;
}
1 change: 0 additions & 1 deletion src/lua/functions/core/game/game_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,4 @@ class GameFunctions {
static int luaGameGetSecretAchievements(lua_State* L);
static int luaGameGetPublicAchievements(lua_State* L);
static int luaGameGetAchievements(lua_State* L);
static int getAllAttachedeffects(lua_State* L); // delete before push
};

0 comments on commit f0dcf55

Please sign in to comment.