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

Function add_speed_suffix

plugins/blueprint.cpp:895–904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893}
894
895static 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
906static const char * get_roller_str(df::building *b) {
907 df::building_rollersst *r = virtual_cast<df::building_rollersst>(b);

Callers 1

get_roller_strFunction · 0.85

Calls 1

cacheFunction · 0.85

Tested by

no test coverage detected