Add invoke_lua function to world model

This commit is contained in:
2021-10-15 14:47:12 -04:00
parent b7b4ad8577
commit 547b87d884
5 changed files with 84 additions and 62 deletions

View File

@@ -1,6 +1,15 @@
#include "invocation.hpp"
const std::string &InvocationData::get(const std::string &key) const {
static std::string blank_;
auto iter = find(key);
if (iter == end()) {
return blank_;
} else {
return iter->second;
}
}
void InvocationData::serialize(StreamBuffer *sb) const {
assert(int(size()) < 65536);