mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-11-12 17:24:40 +03:00
feat(console): add "script" command to debug LUA code
This commit is contained in:
1 parent
d63ebf7696
commit
0950f7dae3
7 files changed
+52
-3
No files matched your search
@@ -9,6 +9,7 @@
|
||||
#include "world/CWorldScene.hpp"
|
||||
#include "gameui/camera/CGCamera.hpp"
|
||||
#include "event/EvtKeyDown.hpp"
|
||||
#include "console/Console.hpp"
|
||||
|
||||
#include "model/Model2.hpp"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "gameui/CGDressUpModelFrame.hpp"
|
||||
#include "gameui/CGTabardModelFrame.hpp"
|
||||
#include "gameui/CGQuestPOIFrame.hpp"
|
||||
#include "console/Console.hpp"
|
||||
#include "ui/FrameXML.hpp"
|
||||
#include "ui/FrameScript.hpp"
|
||||
#include "util/Lua.hpp"
|
||||
@@ -1262,7 +1263,14 @@ static int32_t Script_IsThreatWarningEnabled(lua_State* L) {
|
||||
}
|
||||
|
||||
static int32_t Script_ConsoleAddMessage(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (!lua_isstring(L, 1)) {
|
||||
return luaL_error(L, "Usage: ConsoleAddMessage(string)");
|
||||
}
|
||||
auto text = lua_tolstring(L, 1, 0);
|
||||
if (text && *text) {
|
||||
ConsolePrintf("%s", text);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int32_t Script_GetItemUniqueness(lua_State* L) {
|
||||
|
||||
Reference in new issue
Block a user