| 210 | } |
| 211 | |
| 212 | void scan_back(color_ostream &out) { |
| 213 | if (history.empty() || offset >= history.size()-1) { |
| 214 | DEBUG(cycle,out).print("already at beginning of history\n"); |
| 215 | return; |
| 216 | } |
| 217 | ++offset; |
| 218 | int unit_id = get_cur_unit_id(); |
| 219 | DEBUG(cycle,out).print("scanning back to unit {} at offset {}\n", unit_id, offset); |
| 220 | if (auto unit = df::unit::find(unit_id)) |
| 221 | Gui::revealInDwarfmodeMap(Units::getPosition(unit), false, World::ReadPauseState()); |
| 222 | plotinfo->follow_item = -1; |
| 223 | plotinfo->follow_unit = unit_id; |
| 224 | } |
| 225 | |
| 226 | void scan_forward(color_ostream &out) { |
| 227 | if (history.empty() || offset == 0) { |
no test coverage detected