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

Method remove

plugins/buildingplan/buildingplan.cpp:66–70  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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.
66void 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
72static const int32_t CYCLE_TICKS = 599; // twice per game day
73static int32_t cycle_timestamp = 0; // world->frame_counter at last cycle

Callers 7

hook_refsFunction · 0.45
enable_hookFunction · 0.45
shutdownMethod · 0.45
registerPlannedBuildingFunction · 0.45
doVectorFunction · 0.45

Calls 2

printMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected