get from job; if no job, then fall back to querying map
| 2364 | |
| 2365 | // get from job; if no job, then fall back to querying map |
| 2366 | designation get(const df::coord &pos) const { |
| 2367 | if (designations.count(pos)) { |
| 2368 | return designations.at(pos); |
| 2369 | } |
| 2370 | auto pdes = Maps::getTileDesignation(pos); |
| 2371 | auto pocc = Maps::getTileOccupancy(pos); |
| 2372 | if (!pdes || !pocc) |
| 2373 | return {}; |
| 2374 | return designation(pos, *pdes, *pocc); |
| 2375 | } |
| 2376 | }; |
| 2377 | |
| 2378 | static bool is_designated_for_smoothing(const designation &designation) { |
no test coverage detected