note that this just removes the PlannedBuilding. the tasks will get dropped as we discover them in the tasks queues and they fail to be found in planned_buildings. this "lazy" task cleaning algorithm works because there is no way to re-register a building once it has been removed -- if it has been booted out of planned_buildings, then it has either been built or desroyed. therefore there is no cha
| 64 | // planned_buildings, then it has either been built or desroyed. therefore there is |
| 65 | // no chance of duplicate tasks getting added to the tasks queues. |
| 66 | void PlannedBuilding::remove(color_ostream &out) { |
| 67 | DEBUG(control,out).print("removing persistent data for building {}\n", id); |
| 68 | World::DeletePersistentData(bld_config); |
| 69 | planned_buildings.erase(id); |
| 70 | } |
| 71 | |
| 72 | static const int32_t CYCLE_TICKS = 599; // twice per game day |
| 73 | static int32_t cycle_timestamp = 0; // world->frame_counter at last cycle |
no test coverage detected