| 1768 | } |
| 1769 | |
| 1770 | static command_result dwarfmonitor_cmd(color_ostream &, vector <string> & parameters) { |
| 1771 | if (parameters.empty()) |
| 1772 | return CR_WRONG_USAGE; |
| 1773 | |
| 1774 | auto cmd = parameters[0][0]; |
| 1775 | if (cmd == 's' || cmd == 'S') { |
| 1776 | if(Maps::IsValid()) |
| 1777 | Screen::show(std::make_unique<ViewscreenFortStats>(), plugin_self); |
| 1778 | } |
| 1779 | else if (cmd == 'p' || cmd == 'P') { |
| 1780 | if(Maps::IsValid()) |
| 1781 | Screen::show(std::make_unique<ViewscreenPreferences>(), plugin_self); |
| 1782 | } |
| 1783 | else |
| 1784 | return CR_WRONG_USAGE; |
| 1785 | |
| 1786 | return CR_OK; |
| 1787 | } |
| 1788 | |
| 1789 | DFhackCExport command_result plugin_init(color_ostream &, std::vector <PluginCommand> &commands) |
| 1790 | { |