Working on diff xmission
This commit is contained in:
@@ -80,10 +80,6 @@ public:
|
||||
using IdVector = util::IdVector;
|
||||
using TanVector = std::vector<const Tangible*>;
|
||||
using Redirects = std::map<int64_t, int64_t>;
|
||||
struct TablePairing {
|
||||
std::vector<int> mpair;
|
||||
std::vector<int> spair;
|
||||
};
|
||||
const float RadiusVisibility = 100.0;
|
||||
const float RadiusClose = 10.0;
|
||||
|
||||
@@ -123,6 +119,12 @@ public:
|
||||
//
|
||||
Tangible *tangible_make(lua_State *L, int64_t id, bool pushdb);
|
||||
|
||||
// Get the tangible ID of the specified LUA tangible database.
|
||||
//
|
||||
// Return zero if the item is not a tangible database.
|
||||
//
|
||||
static int64_t tangible_id(const LuaStack &LS, LuaSlot slot);
|
||||
|
||||
// Get a pointer to the specified tangible.
|
||||
//
|
||||
// If there's no such tangible, returns nullptr.
|
||||
@@ -135,7 +137,7 @@ public:
|
||||
// The value on the lua stack should be a valid lua tangible. If not,
|
||||
// a lua error is generated.
|
||||
//
|
||||
Tangible *tangible_get(lua_State *L, int idx);
|
||||
Tangible *tangible_get(const LuaStack &LS, LuaSlot slot);
|
||||
|
||||
// Get pointers to many tangibles.
|
||||
//
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
// Paired tables debug string. Shows TID=TID pairs, sorted alphabetically.
|
||||
//
|
||||
std::string paired_tables_debug_string(lua_State *master, const TablePairing *pairing) const;
|
||||
std::string paired_tables_debug_string(lua_State *master) const;
|
||||
|
||||
// Store a string in the tangible's database.
|
||||
//
|
||||
@@ -296,21 +298,29 @@ public:
|
||||
//
|
||||
void unnumber_lua_tables();
|
||||
|
||||
// Associates numbered tables in the master model with numbered tables in the synch model.
|
||||
// Number tables in the master model to match already-numbered tables in the synch model.
|
||||
//
|
||||
void pair_lua_tables(const IdVector &basis, lua_State *master, TablePairing *pair);
|
||||
void pair_lua_tables(const IdVector &basis, lua_State *master);
|
||||
|
||||
// Pairs any not-yet-paired master table to a virtually-created table in the synch model.
|
||||
// Pairs every not-yet-paired master table to a virtually-created table in the synch model.
|
||||
//
|
||||
// Returns the number of new tables that need to be created in the synch model.
|
||||
//
|
||||
int pair_new_tables(TablePairing *pair);
|
||||
int pair_new_tables(const IdVector &basis, lua_State *master);
|
||||
|
||||
// This is followup for pair_new_tables: actually create the new tables that
|
||||
// were virtually created in the pair_new_tables step.
|
||||
//
|
||||
void create_new_tables(int n);
|
||||
|
||||
// Compare the general tables.
|
||||
//
|
||||
void diff_lua_tables(lua_State *master, StreamBuffer *sb);
|
||||
|
||||
// Compare the tangible databases.
|
||||
//
|
||||
void diff_tangible_databases(const IdVector &basis, lua_State *master, StreamBuffer *sb);
|
||||
|
||||
private:
|
||||
// Type of model
|
||||
util::WorldType world_type_;
|
||||
|
||||
Reference in New Issue
Block a user