Remove the /menu and /choose commands from text console
This commit is contained in:
@@ -145,15 +145,6 @@ public:
|
||||
stdostream() << "Unknown command: " << name << std::endl;
|
||||
}
|
||||
|
||||
virtual void do_choose_command(int64_t index) override {
|
||||
eng::string action = gui_.get_action(index);
|
||||
if (action == "") {
|
||||
stdostream() << "Invalid menu item #" << index << std::endl;
|
||||
return;
|
||||
}
|
||||
send_invocation(Invocation(Invocation::KIND_CHOOSE, actor_id_, gui_.place(), action));
|
||||
}
|
||||
|
||||
virtual void do_view_command() override {
|
||||
stdostream() << world_->tangibles_near_debug_string(actor_id_, 1000);
|
||||
}
|
||||
@@ -162,12 +153,6 @@ public:
|
||||
do_unknown_command("moveto");
|
||||
}
|
||||
|
||||
virtual void do_menu_command(int64_t tanid) override {
|
||||
world_to_asynchronous();
|
||||
world_->update_gui(actor_id_, (tanid==0) ? actor_id_ : tanid, &gui_);
|
||||
stdostream() << gui_.menu_debug_string();
|
||||
}
|
||||
|
||||
virtual void do_quit_command() override {
|
||||
abandon_server();
|
||||
stop_driver();
|
||||
|
||||
@@ -74,15 +74,6 @@ public:
|
||||
stdostream() << "Unknown command: " << name << std::endl;
|
||||
}
|
||||
|
||||
virtual void do_choose_command(int64_t n) override {
|
||||
eng::string action = gui_.get_action(n);
|
||||
if (action == "") {
|
||||
stdostream() << "Invalid menu item #" << std::endl;
|
||||
return;
|
||||
}
|
||||
master_->invoke(Invocation(Invocation::KIND_CHOOSE, admin_id_, gui_.place(), action));
|
||||
}
|
||||
|
||||
virtual void do_view_command() override {
|
||||
stdostream() << master_->tangibles_near_debug_string(admin_id_, 1000);
|
||||
}
|
||||
@@ -91,11 +82,6 @@ public:
|
||||
do_unknown_command("moveto");
|
||||
}
|
||||
|
||||
virtual void do_menu_command(int64_t tanid) override {
|
||||
master_->update_gui(admin_id_, (tanid == 0) ? admin_id_ : tanid, &gui_);
|
||||
stdostream() << gui_.menu_debug_string();
|
||||
}
|
||||
|
||||
virtual void do_quit_command() override {
|
||||
stop_driver();
|
||||
}
|
||||
|
||||
@@ -116,14 +116,6 @@ void CommonCommands::do_command(const StringVec &words) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (words[0] == "choose") {
|
||||
if ((words.size() == 2)&&(sv::valid_int64(words[1]))) {
|
||||
return do_choose_command(sv::to_int64(words[1]));
|
||||
} else {
|
||||
return do_syntax_error("/choose [menu-line-number]");
|
||||
}
|
||||
}
|
||||
|
||||
if (words[0] == "view") {
|
||||
if (words.size() == 1) {
|
||||
return do_view_command();
|
||||
@@ -140,16 +132,6 @@ void CommonCommands::do_command(const StringVec &words) {
|
||||
}
|
||||
}
|
||||
|
||||
if (words[0] == "menu") {
|
||||
if (words.size() == 1) {
|
||||
return do_menu_command(0);
|
||||
} else if ((words.size() == 2) && sv::valid_int64(words[1])) {
|
||||
return do_menu_command(sv::to_int64(words[1]));
|
||||
} else {
|
||||
return do_syntax_error("/menu [optional-tangible-id]");
|
||||
}
|
||||
}
|
||||
|
||||
if (words[0] == "quit") {
|
||||
if (words.size() == 1) {
|
||||
return do_quit_command();
|
||||
|
||||
@@ -98,10 +98,8 @@ public:
|
||||
protected:
|
||||
virtual void do_syntax_error(std::string_view error) = 0;
|
||||
virtual void do_unknown_command(std::string_view name) = 0;
|
||||
virtual void do_choose_command(int64_t n) = 0;
|
||||
virtual void do_view_command() = 0;
|
||||
virtual void do_moveto_command(int x, int y) = 0;
|
||||
virtual void do_menu_command(int64_t tanid) = 0;
|
||||
virtual void do_quit_command() = 0;
|
||||
virtual void do_cpl_command() = 0;
|
||||
virtual void do_work_command() = 0;
|
||||
|
||||
Reference in New Issue
Block a user