mirror of
https://github.com/libretro/devilutionX.git
synced 2026-11-09 17:22:49 -10:00
Fully migrates debug commands to Lua and organizes them into logical
groups.
The CLI `+` syntax now runs Lua, e.g.:
```bash
build/devilutionx '+dev.player.trn.plr("infra")'
```
Chat hotkeys run Lua code if they start with `/lua`, e.g.:
```ini
[NetMsg]
QuickMessage1=/lua message(dev.player.info())
```
23 lines
477 B
C++
23 lines
477 B
C++
#ifdef _DEBUG
|
|
#pragma once
|
|
|
|
#include <string_view>
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "engine/surface.hpp"
|
|
|
|
namespace devilution {
|
|
|
|
void InitConsole();
|
|
bool IsConsoleOpen();
|
|
void OpenConsole();
|
|
bool ConsoleHandleEvent(const SDL_Event &event);
|
|
void DrawConsole(const Surface &out);
|
|
void RunInConsole(std::string_view code);
|
|
void PrintToConsole(std::string_view text);
|
|
void PrintWarningToConsole(std::string_view text);
|
|
|
|
} // namespace devilution
|
|
#endif // _DEBUG
|