Plan invocations are now serializable objects

This commit is contained in:
2021-07-19 15:32:34 -04:00
parent a39eb4a218
commit 92f7d8cd91
9 changed files with 133 additions and 15 deletions

View File

@@ -6,6 +6,7 @@
#include "planemap.hpp"
#include "idalloc.hpp"
#include "animqueue.hpp"
#include "invocation.hpp"
#include "sched.hpp"
#include "source.hpp"
#include "gui.hpp"
@@ -113,6 +114,10 @@ public:
// Check if main thread has nothing on the stack
bool stack_is_clear() const { return lua_gettop(state()) == 0; }
// Invoke an action plan.
//
void invoke_plan(int64_t actor_id, int64_t place_id, const std::string &action, const InvocationData &idata);
public:
// Constructor.
//
@@ -181,10 +186,13 @@ public:
//
void update_gui(int64_t actor_id, int64_t place_id, Gui *gui);
// Invoke an action plan.
// Invoke an Invocation object.
//
void invoke_plan(int64_t actor_id, int64_t place_id, const std::string &action, const GuiResult &gres);
// This is the primary dispatcher for all operations that mutate a world model.
// To mutate a world model, create an invocation, then invoke it.
//
void invoke(const Invocation &inv);
// fetch_global_pointer
//
// Given a lua state, fetch the world model associated with