Change the creation/deletion of tangibles so that the tangible database is never really deleted.

This commit is contained in:
2023-03-16 23:31:29 -04:00
parent 86a27ef2d4
commit a8c780563f
9 changed files with 152 additions and 90 deletions

View File

@@ -137,17 +137,21 @@ public:
// Get a pointer to the specified tangible.
//
// If there's no such tangible, returns nullptr.
// If there's no such tangible, or if the tangible is deleted,
// returns nullptr.
//
Tangible *tangible_get(int64_t id);
const Tangible *tangible_get(int64_t id) const;
// Get a pointer to the specified tangible.
//
// The value on the lua stack should be a valid lua tangible. If not,
// a lua error is generated.
// The value on the lua stack should be a lua tangible.
//
Tangible *tangible_get(const LuaStack &LS, LuaSlot slot);
// If the 'allowdel' flag is true, then it is valid to pass in
// a deleted tangible. In that case, this function returns nullptr,
// but this is not a Lua error.
//
Tangible *tangible_get(const LuaStack &LS, LuaSlot slot, bool allowdel);
// Get pointers to many tangibles.
//