| 158 | } |
| 159 | |
| 160 | static command_result do_command(color_ostream &out, std::vector<string> ¶meters){ |
| 161 | if (!Core::getInstance().isMapLoaded() || !World::isFortressMode()) { |
| 162 | out.printerr("Cannot run {} without a loaded fort.\n", plugin_name); |
| 163 | return CR_FAILURE; |
| 164 | } |
| 165 | |
| 166 | if (parameters.size() == 0 || parameters[0] == "status") |
| 167 | { |
| 168 | printStatus(out); |
| 169 | return CR_OK; |
| 170 | } else if (parameters.size() > 1 && parameters[0] == "burrow") { |
| 171 | setBurrow(out, parameters[1]); |
| 172 | return CR_OK; |
| 173 | } else if (parameters[0] == "all") { |
| 174 | config.set_int(CONFIG_BURROW, -1); |
| 175 | return CR_OK; |
| 176 | } else { |
| 177 | return CR_WRONG_USAGE; |
| 178 | } |
| 179 | } |
| 180 | ///////////////////////////////////////////////////// |
| 181 | // cycle logic |
| 182 | // |
nothing calls this directly
no test coverage detected