Skip to content

Commit 5c9b50f

Browse files
authored
Add clearDebugBox (#2160)
* Add clearDebug for devs * Add clearConsoleHistory * Revert clearConsoleHistory & rename clearDebug to clearDebugBox
1 parent 3027499 commit 5c9b50f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaClientDefs.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ void CLuaClientDefs::LoadFunctions()
1919
{"setTransferBoxVisible", ArgumentParser<SetTransferBoxVisible>},
2020
{"isTransferBoxVisible", ArgumentParser<IsTransferBoxVisible>},
2121
{"isTransferBoxAlwaysVisible", ArgumentParser<IsTransferBoxAlwaysVisible>},
22+
23+
{"clearDebugBox", ArgumentParser<ClearDebug>}
2224
};
2325

2426
for (const auto& [name, func] : functions)
@@ -39,3 +41,9 @@ bool CLuaClientDefs::IsTransferBoxAlwaysVisible()
3941
{
4042
return g_pClientGame->GetTransferBox()->IsAlwaysVisible();
4143
}
44+
45+
bool CLuaClientDefs::ClearDebug()
46+
{
47+
g_pCore->DebugClear();
48+
return true;
49+
}

Client/mods/deathmatch/logic/luadefs/CLuaClientDefs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ class CLuaClientDefs : public CLuaDefs
2222
static bool SetTransferBoxVisible(bool visible);
2323
static bool IsTransferBoxVisible();
2424
static bool IsTransferBoxAlwaysVisible();
25+
static bool ClearDebug();
2526
};

0 commit comments

Comments
 (0)