Change the creation/deletion of tangibles so that the tangible database is never really deleted.
This commit is contained in:
@@ -222,9 +222,8 @@ int LuaTypeTagValue(lua_State *L) { return 0; }
|
||||
#define LUA_TT_GLOBALENV 18
|
||||
#define LUA_TT_TANGIBLE 19
|
||||
#define LUA_TT_TANGIBLEMETA 20
|
||||
#define LUA_TT_DEADTANGIBLE 21
|
||||
#define LUA_TT_GLOBALDB 22
|
||||
#define LUA_TT_CLASS 23
|
||||
#define LUA_TT_GLOBALDB 21
|
||||
#define LUA_TT_CLASS 22
|
||||
|
||||
// World types enum.
|
||||
|
||||
@@ -458,8 +457,16 @@ public:
|
||||
void makeclass(LuaSlot tab, LuaSlot name) const;
|
||||
void makeclass(LuaSlot tab, std::string_view name) const;
|
||||
|
||||
// Get the ID of a tangible. It's a little weird to put this in
|
||||
// this module.
|
||||
// Create a tangible, or look up an existing tangible.
|
||||
// This doesn't do the entire process of tangible creation. It
|
||||
// just creates an empty table, marks it as a tangible, creates
|
||||
// the metatable, stores the tangible ID, and stores it in the tangible table.
|
||||
void maketan(LuaSlot tab, int64_t id) const;
|
||||
|
||||
// Return true if a tangible is empty (deleted or not yet created).
|
||||
bool tanblank(LuaSlot tab) const;
|
||||
|
||||
// Get the ID of a tangible.
|
||||
int64_t tanid(LuaSlot tab) const;
|
||||
|
||||
// Return true if the value is a sortable key (string, number, or boolean).
|
||||
|
||||
Reference in New Issue
Block a user