Add define parameters and support aliases and definitions in action files

This commit is contained in:
cantyonion committed 2026-11-24 13:45:18 +08:00
1 parent fb8ef636bd
commit 0a6193f68e
12 files changed
+291 -63

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include <map>
#include <string>
#include <string_view>
namespace Bilicraft
{
class CommandBindings
{
public:
// Process one trimmed, comment-free line. Declarations return an empty string.
// A console caller can supply display to enable list and lookup commands.
std::string Expand(std::string_view line, std::size_t maxLength, std::string *display = nullptr);
private:
using Bindings = std::map<std::string, std::string, std::less<>>;
Bindings aliases;
Bindings definitions;
};
} // namespace Bilicraft