diff --git a/Readme.rst b/Readme.rst index 7491c4a0c..8a3ce97c5 100644 --- a/Readme.rst +++ b/Readme.rst @@ -2947,7 +2947,7 @@ in-game help. gui/mod-manager =============== -A way to simply install and remove small mods. It looks for specially formated mods in +A way to simply install and remove small mods. It looks for specially formatted mods in df subfolder 'mods'. Mods are not included, for example mods see: `github mini mod repository `_ .. image:: images/mod-manager.png diff --git a/plugins/3dveins.cpp b/plugins/3dveins.cpp index 432d93cf6..c9e15aae5 100644 --- a/plugins/3dveins.cpp +++ b/plugins/3dveins.cpp @@ -42,6 +42,7 @@ using namespace MapExtras; using namespace DFHack::Random; using df::global::world; +using df::global::gametype; command_result cmd_3dveins(color_ostream &out, std::vector & parameters); @@ -1573,6 +1574,12 @@ command_result cmd_3dveins(color_ostream &con, std::vector & parame return CR_FAILURE; } + if (*gametype != game_type::DWARF_MAIN && *gametype != game_type::DWARF_RECLAIM) + { + con.printerr("Must be used in fortress mode!\n"); + return CR_FAILURE; + } + VeinGenerator generator(con); con.print("Collecting statistics...\n"); diff --git a/plugins/command-prompt.cpp b/plugins/command-prompt.cpp index d7a8e230c..5e84db831 100644 --- a/plugins/command-prompt.cpp +++ b/plugins/command-prompt.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -55,9 +56,14 @@ public: df::global::gps->display_frames=show_fps; } - void add_response(color_value v,std::string s) + void add_response(color_value v, std::string s) { - responses.push_back(std::make_pair(v,s)); + std::stringstream ss(s); + std::string part; + while (std::getline(ss, part)) + { + responses.push_back(std::make_pair(v, part + '\n')); + } } protected: std::list > responses; @@ -166,6 +172,10 @@ void viewscreen_commandpromptst::feed(std::set *events) DFHACK_PLUGIN("command-prompt"); command_result show_prompt(color_ostream &out, std::vector & parameters) { + if (Gui::getCurFocus() == "dfhack/commandprompt") + { + Screen::dismiss(Gui::getCurViewscreen(true)); + } std::string params; for(size_t i=0;iempty()) + { + return false; + } df::interface_key last_token = *input->rbegin(); if (last_token >= interface_key::STRING_A032 && last_token <= interface_key::STRING_A126) {