feat(npc): ebreak support through external inst matching

This commit is contained in:
xinyangli 2024-04-11 11:44:54 +08:00
parent 55230247b2
commit e99236f711
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
8 changed files with 97 additions and 25 deletions

View file

@ -83,6 +83,12 @@ void Console::registerCommand(const std::string &s, CommandFunction f) {
pimpl_->commands_[s] = f;
}
void Console::removeCommands(const std::vector<std::string> sv) {
for (auto const &s : sv) {
pimpl_->commands_.erase(s);
}
}
std::vector<std::string> Console::getRegisteredCommands() const {
std::vector<std::string> allCommands;
for (auto &pair : pimpl_->commands_)