When you 'invoke' lua code, it creates coroutine
This commit is contained in:
@@ -264,6 +264,13 @@ bool world_type_authoritative(util::WorldType wt) {
|
||||
return (wt == WORLD_TYPE_MASTER) || (wt == WORLD_TYPE_STANDALONE);
|
||||
}
|
||||
|
||||
LuaSourcePtr make_lua_source(const std::string &code) {
|
||||
LuaSourcePtr result(new LuaSourceVec);
|
||||
std::string fn = "file.lua";
|
||||
result->push_back(std::make_pair(fn, code));
|
||||
return result;
|
||||
}
|
||||
|
||||
static std::string get_file_contents(const std::string &fn) {
|
||||
std::ifstream fs(fn);
|
||||
std::stringstream buffer;
|
||||
|
||||
Reference in New Issue
Block a user