| 224 | } |
| 225 | |
| 226 | void scan_forward(color_ostream &out) { |
| 227 | if (history.empty() || offset == 0) { |
| 228 | DEBUG(cycle,out).print("already at most recent unit; following new unit\n"); |
| 229 | follow_a_dwarf(out); |
| 230 | return; |
| 231 | } |
| 232 | |
| 233 | --offset; |
| 234 | int unit_id = get_cur_unit_id(); |
| 235 | DEBUG(cycle,out).print("scanning forward to unit {} at offset {}\n", unit_id, offset); |
| 236 | if (auto unit = df::unit::find(unit_id)) |
| 237 | Gui::revealInDwarfmodeMap(Units::getPosition(unit), false, World::ReadPauseState()); |
| 238 | plotinfo->follow_item = -1; |
| 239 | plotinfo->follow_unit = unit_id; |
| 240 | } |
| 241 | |
| 242 | int32_t get_cur_unit_id() { |
| 243 | if (offset >= history.size()) |
no test coverage detected