Plan invocations are now serializable objects
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "luastack.hpp"
|
||||
#include "util.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "invocation.hpp"
|
||||
#include "world.hpp"
|
||||
#include "traceback.hpp"
|
||||
#include "textgame.hpp"
|
||||
@@ -122,10 +123,11 @@ void TextGame::do_choose_command(const StringVec &cmd) {
|
||||
}
|
||||
std::string action = elts[index].action();
|
||||
std::cerr << "Invoking plan: " << action << std::endl;
|
||||
GuiResult dummyresult;
|
||||
InvocationData dummyresult;
|
||||
dummyresult["flavor"] = "chocolate";
|
||||
dummyresult["color"] = "blue";
|
||||
world_->invoke_plan(actor_id_, gui_place_, action, dummyresult);
|
||||
Invocation inv(Invocation::KIND_PLAN, actor_id_, gui_place_, action, dummyresult);
|
||||
world_->invoke(inv);
|
||||
}
|
||||
|
||||
void TextGame::do_snapshot_command(const StringVec &cmd) {
|
||||
|
||||
Reference in New Issue
Block a user