| 14 | using namespace df::enums; |
| 15 | |
| 16 | command_result df_counters (color_ostream &out, vector <string> & parameters) |
| 17 | { |
| 18 | df::unit *unit = Gui::getSelectedUnit(out); |
| 19 | if (!unit) |
| 20 | return CR_WRONG_USAGE; |
| 21 | auto &counters = unit->status.misc_traits; |
| 22 | for (size_t i = 0; i < counters.size(); i++) |
| 23 | { |
| 24 | auto counter = counters[i]; |
| 25 | out.print("{} ({}) : {}\n", (int)counter->id, ENUM_KEY_STR(misc_trait_type, counter->id), counter->value); |
| 26 | } |
| 27 | |
| 28 | return CR_OK; |
| 29 | } |
| 30 | |
| 31 | DFHACK_PLUGIN("counters"); |
| 32 |
nothing calls this directly
no test coverage detected