fix: commands repository not reset before world open
This commit is contained in:
@@ -125,6 +125,10 @@ namespace cmd {
|
||||
const std::unordered_map<std::string, Command>& getCommands() const {
|
||||
return commands;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
commands.clear();
|
||||
}
|
||||
};
|
||||
|
||||
class CommandsInterpreter {
|
||||
@@ -158,5 +162,10 @@ namespace cmd {
|
||||
CommandsRepository* getRepository() const {
|
||||
return repository.get();
|
||||
}
|
||||
|
||||
void reset() {
|
||||
repository->clear();
|
||||
variables.clear();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user