MCPcopy Create free account
hub / github.com/DFHack/dfhack / dwarfmonitor_cmd

Function dwarfmonitor_cmd

plugins/dwarfmonitor.cpp:1770–1787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1768}
1769
1770static 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
1789DFhackCExport command_result plugin_init(color_ostream &, std::vector <PluginCommand> &commands)
1790{

Callers

nothing calls this directly

Calls 2

showFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected