global.set has been implemented, but not diff xmit for globals
This commit is contained in:
@@ -379,7 +379,9 @@ public:
|
||||
//
|
||||
void tangible_set_string(int64_t id, const eng::string &path, const eng::string &value);
|
||||
|
||||
// Copy a lua global variable into the tangible's database.
|
||||
// Copy a from the lua global environment into the tangible's database.
|
||||
//
|
||||
// This is for unit testing.
|
||||
//
|
||||
void tangible_copy_global(int64_t id, const eng::string &path, const eng::string &global);
|
||||
|
||||
@@ -516,6 +518,13 @@ private:
|
||||
SourceDB source_db_;
|
||||
PlaneMap plane_map_;
|
||||
|
||||
// Lua Globals
|
||||
//
|
||||
int64_t next_gvar_assign_;
|
||||
eng::map<eng::string, int64_t> gvar_to_assign_;
|
||||
eng::map<eng::string, eng::string> gvar_to_serial_;
|
||||
eng::map<int64_t, eng::string> assign_to_gvar_;
|
||||
|
||||
// Tangibles table.
|
||||
//
|
||||
eng::unordered_map<int64_t, UniqueTangible> tangibles_;
|
||||
@@ -551,6 +560,7 @@ private:
|
||||
std::unique_ptr<eng::ostringstream> lthread_prints_;
|
||||
|
||||
friend class Tangible;
|
||||
friend void global_set(LuaStack &LS0, const eng::string &gvar, LuaSlot value);
|
||||
friend int lfn_tangible_animate(lua_State *L);
|
||||
friend int lfn_tangible_build(lua_State *L);
|
||||
friend int lfn_tangible_redirect(lua_State *L);
|
||||
@@ -566,6 +576,7 @@ private:
|
||||
friend int lfn_wait(lua_State *L);
|
||||
friend int lfn_nopredict(lua_State *L);
|
||||
friend int lfn_http_request(lua_State *L, const char *method);
|
||||
friend int lfn_global_set(lua_State *L);
|
||||
};
|
||||
|
||||
using UniqueWorld = std::unique_ptr<World>;
|
||||
|
||||
Reference in New Issue
Block a user