MCPcopy Create free account
hub / github.com/Warzone2100/warzone2100 / structureBuildPointsToCompletion

Function structureBuildPointsToCompletion

src/structure.cpp:892–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892uint32_t structureBuildPointsToCompletion(const STRUCTURE & structure)
893{
894 if (structureHasModules(&structure)) {
895 auto moduleStat = getModuleStat(&structure);
896
897 if (moduleStat != nullptr) {
898 return moduleStat->buildPoints;
899 }
900 }
901
902 return structure.pStructureType->buildPoints;
903}
904
905float structureCompletionProgress(const STRUCTURE & structure)
906{

Callers 9

recvBuildFinishedFunction · 0.85
structureBuildFunction · 0.85
structureUpdateFunction · 0.85
buildingCompleteFunction · 0.85
loadSaveStructure2Function · 0.85
saveMissionDataFunction · 0.85
selectedMethod · 0.85
updateProgressBarMethod · 0.85

Calls 2

structureHasModulesFunction · 0.85
getModuleStatFunction · 0.85

Tested by

no test coverage detected