Added tangible_make to world

This commit is contained in:
2021-01-17 16:23:10 -05:00
parent 313e78067a
commit 1f898afdd4
5 changed files with 94 additions and 9 deletions

View File

@@ -14,6 +14,10 @@ class World;
class Tangible {
public:
// Simple constructor initializes everything to null.
//
Tangible();
// Always points back to the world model.
World *world_;
@@ -68,6 +72,18 @@ public:
//
lua_State *get_lua_state() { return lua_state_; }
// Make a tangible with a generated ID.
//
// Pushes the database onto the lua stack and returns the tangible pointer.
//
Tangible *tangible_make(lua_State *L);
// Delete a tangible with the specified ID.
//
// If the tangible doesn't exist, does nothing.
//
void tangible_del(int64_t id);
// fetch
//
// Given a lua state, fetch the world model associated with