9 Commits

Author SHA1 Message Date
Anders Jenbo 005e7dcc23 chore: clang-tidy cleanup part 1 2026-04-03 22:57:48 +02:00
Gleb Mazovetskiy 6fe417216e Lua console: Trigger autocomplete less often
Filter out more cases where autocomplete just gets in the way.
2025-07-20 17:46:35 +02:00
Gleb Mazovetskiy 17e6da40f8 Lua: Improve function/property handling
1. Follows advice from
   https://sol2.readthedocs.io/en/latest/functions.html to use
   `set_function` when binding functions.
2. Adds autocomplete support for userdata methods.
3. Simplifies property bindings and improves string handling.
2025-07-20 17:46:35 +02:00
Gleb Mazovetskiy 740868af3f Update sol2 and lua
Also renames lua/lua.hpp to lua/lua_global.hpp.

The previous name broke version auto-detection in sol2, which involves
calling `__has_include(<lua/lua.hpp>)`.
2025-07-20 17:46:35 +02:00
Gleb Mazovetskiy e9c29fa806 Switch to ankerl::unordered_dense 2024-08-05 01:17:13 +01:00
Gleb Mazovetskiy a2b94cc03c Lua: Migrate and organize the rest of debug cmds
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())
```
2023-11-07 22:27:48 +00:00
Gleb Mazovetskiy c4d819a54f Lua: Show signatures of native (non-C) functions 2023-11-06 10:42:16 +00:00
Gleb Mazovetskiy 8bffbedcb4 Migrate some debug.cpp commands to Lua
Introduces a new `devilutionx.dev` Lua module, automatically loaded in
the console prelude.

Arguments and basic help are shown in autocompletion.
2023-11-04 20:28:27 +00:00
Gleb Mazovetskiy b30b712cbb Lua: Add basic autocomplete in the console 2023-11-03 19:19:45 +00:00