| 150 | } |
| 151 | |
| 152 | string ItemTypeInfo::getToken() { |
| 153 | string rv = ENUM_KEY_STR(item_type, type); |
| 154 | if (custom) |
| 155 | rv += ":" + custom->id; |
| 156 | else if (subtype != -1 && type != item_type::PLANT_GROWTH) |
| 157 | rv += fmt::format(":{}", subtype); |
| 158 | return rv; |
| 159 | } |
| 160 | |
| 161 | string ItemTypeInfo::toString() |
| 162 | { using namespace df::enums::item_type; |
no outgoing calls
no test coverage detected