| 893 | } |
| 894 | |
| 895 | static const char * add_speed_suffix(df::building_rollersst *r, |
| 896 | const char *prefix) { |
| 897 | int32_t speed = r->speed; |
| 898 | if (speed >= 50000) return prefix; |
| 899 | string sprefix(prefix); |
| 900 | if (speed >= 40000) return cache(sprefix + "q"); |
| 901 | if (speed >= 30000) return cache(sprefix + "qq"); |
| 902 | if (speed >= 20000) return cache(sprefix + "qqq"); |
| 903 | return cache(sprefix + "qqqq"); |
| 904 | } |
| 905 | |
| 906 | static const char * get_roller_str(df::building *b) { |
| 907 | df::building_rollersst *r = virtual_cast<df::building_rollersst>(b); |
no test coverage detected