From ed3cd148c36468f9fc5fd7e5153e19934cdc7e06 Mon Sep 17 00:00:00 2001 From: kokekanon Date: Wed, 13 Dec 2023 21:50:37 -0300 Subject: [PATCH] Revert "fix: Move setEffectAlpha and setMissileAlpha from framework to client" This reverts commit e58a883927a1584c4ae15c2f2a0cda4a172cd79b. --- src/client/luafunctions.cpp | 4 ---- src/framework/luafunctions.cpp | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/luafunctions.cpp b/src/client/luafunctions.cpp index 221fec3634..5f78f4d869 100644 --- a/src/client/luafunctions.cpp +++ b/src/client/luafunctions.cpp @@ -363,10 +363,6 @@ 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); diff --git a/src/framework/luafunctions.cpp b/src/framework/luafunctions.cpp index 0f6d44e9f4..85f7bcda26 100644 --- a/src/framework/luafunctions.cpp +++ b/src/framework/luafunctions.cpp @@ -31,7 +31,7 @@ #include #include #include - +#include #ifdef FRAMEWORK_GRAPHICS #include "framework/graphics/particleeffect.h" @@ -324,6 +324,10 @@ 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");