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

Function validate_pb

plugins/buildingplan/buildingplan.cpp:1118–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1116}
1117
1118static bool validate_pb(color_ostream &out, df::building *bld, int index) {
1119 if (!isPlannedBuilding(out, bld) || bld->jobs.size() != 1)
1120 return false;
1121
1122 auto &job_items = bld->jobs[0]->job_items.elements;
1123 if ((int)job_items.size() <= index)
1124 return false;
1125
1126 PlannedBuilding &pb = planned_buildings.at(bld->id);
1127 if ((int)pb.vector_ids.size() <= index)
1128 return false;
1129
1130 return true;
1131}
1132
1133static string getDescString(color_ostream &out, df::building *bld, int index) {
1134 DEBUG(control,out).print("entering getDescString\n");

Callers 3

getDescStringFunction · 0.85
getQueuePositionFunction · 0.85
makeTopPriorityFunction · 0.85

Calls 2

isPlannedBuildingFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected