More refactoring and cleanup
This commit is contained in:
@@ -18,7 +18,6 @@ public:
|
||||
LuaConsole console_;
|
||||
PrintChanneler print_channeler_;
|
||||
Gui gui_;
|
||||
int64_t gui_place_;
|
||||
|
||||
public:
|
||||
void set_initial_state() {
|
||||
@@ -104,22 +103,14 @@ public:
|
||||
}
|
||||
|
||||
void do_view_command(const StringVec &cmd) {
|
||||
for (int64_t id : world_->get_near(actor_id_, 100, true)) {
|
||||
const Tangible *tan = world_->tangible_get(id);
|
||||
const AnimStep &aqback = tan->anim_queue_.back();
|
||||
stdostream() << id << ": " << aqback.graphic() << " " << aqback.plane() << " " << aqback.xyz().debug_string() << std::endl;
|
||||
}
|
||||
stdostream() << world_->tangibles_near_debug_string(actor_id_, 100);
|
||||
}
|
||||
|
||||
void do_menu_command(const StringVec &cmd) {
|
||||
world_to_asynchronous();
|
||||
gui_place_ = util::strtoint(cmd[1], actor_id_);
|
||||
world_->update_gui(actor_id_, gui_place_, &gui_);
|
||||
int index = 0;
|
||||
for (const GuiElt &elt : gui_.elts()) {
|
||||
stdostream() << index << " " << elt.label() << std::endl;
|
||||
index += 1;
|
||||
}
|
||||
int64_t place = util::strtoint(cmd[1], actor_id_);
|
||||
world_->update_gui(actor_id_, place, &gui_);
|
||||
stdostream() << gui_.menu_debug_string();
|
||||
}
|
||||
|
||||
void do_choose_command(const StringVec &cmd) {
|
||||
@@ -129,7 +120,7 @@ public:
|
||||
return;
|
||||
}
|
||||
stdostream() << "Invoking plan: " << action << std::endl;
|
||||
Invocation inv(Invocation::KIND_PLAN, actor_id_, gui_place_, action);
|
||||
Invocation inv(Invocation::KIND_PLAN, actor_id_, gui_.place(), action);
|
||||
send_invocation(inv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user