Skip to content

Commit

Permalink
fix: Move setEffectAlpha and setMissileAlpha from "framework" to "cli…
Browse files Browse the repository at this point in the history
…ent" (luafunctions) (#677)

* feat: Opacity effect and missile in options

issue of "roriscrave" in otland

* OTC naming convention

OTC naming convention

* test review conde2

- with bug (opacity in tile)

* fix: capital letter

* line

* Update modules/client_options/general.otui

Co-authored-by: Caio Santoro dos Santos <61211407+csantbr@users.noreply.github.com>

* Fix: Opacity tile

* fix: Move setEffectAlpha and setMissileAlpha from framework to client

* Revert "fix: Move setEffectAlpha and setMissileAlpha from framework to client"

This reverts commit e58a883.

* Revert "Revert "fix: Move setEffectAlpha and setMissileAlpha from framework to client""

This reverts commit ed3cd14.

* fix: line

---------

Co-authored-by: Caio Santoro dos Santos <61211407+csantbr@users.noreply.github.com>
  • Loading branch information
kokekanon and csantbr authored Dec 15, 2023
1 parent a589e5d commit 72744ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/client/luafunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ void Client::registerLuaFunctions()
g_lua.registerSingletonClass("g_gameConfig");
g_lua.bindSingletonFunction("g_gameConfig", "loadFonts", &GameConfig::loadFonts, &g_gameConfig);

g_lua.registerSingletonClass("g_client");
g_lua.bindSingletonFunction("g_client", "setEffectAlpha", &Client::setEffectAlpha, &g_client);
g_lua.bindSingletonFunction("g_client", "setMissileAlpha", &Client::setMissileAlpha, &g_client);

g_lua.registerSingletonClass("g_attachedEffects");
g_lua.bindSingletonFunction("g_attachedEffects", "getById", &AttachedEffectManager::getById, &g_attachedEffects);
g_lua.bindSingletonFunction("g_attachedEffects", "registerByThing", &AttachedEffectManager::registerByThing, &g_attachedEffects);
Expand Down
6 changes: 0 additions & 6 deletions src/framework/luafunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <framework/platform/platform.h>
#include <framework/stdext/net.h>
#include <framework/util/crypt.h>
#include <client/client.h>

#ifdef FRAMEWORK_GRAPHICS
#include "framework/graphics/particleeffect.h"
Expand Down Expand Up @@ -324,11 +323,6 @@ void Application::registerLuaFunctions()
g_lua.bindSingletonFunction("g_app", "setAnimatedTextScale", &GraphicalApplication::setAnimatedTextScale, &g_app);
g_lua.bindSingletonFunction("g_app", "setStaticTextScale", &GraphicalApplication::setStaticTextScale, &g_app);

// Client
g_lua.registerSingletonClass("g_client");
g_lua.bindSingletonFunction("g_client", "setEffectAlpha", &Client::setEffectAlpha, &g_client);
g_lua.bindSingletonFunction("g_client", "setMissileAlpha", &Client::setMissileAlpha, &g_client);

// PlatformWindow
g_lua.registerSingletonClass("g_window");
g_lua.bindSingletonFunction("g_window", "move", &PlatformWindow::move, &g_window);
Expand Down

0 comments on commit 72744ed

Please # to comment.