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

Function structureCompletionProgress

src/structure.cpp:905–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903}
904
905float structureCompletionProgress(const STRUCTURE & structure)
906{
907 return MIN(1, structure.currentBuildPts / (float)structureBuildPointsToCompletion(structure));
908}
909
910/// Add buildPoints to the structures currentBuildPts, due to construction work by the droid
911/// Also can deconstruct (demolish) a building if passed negative buildpoints

Callers 4

destroyStructFunction · 0.85
structureBodyBuiltFunction · 0.85
structHeightScaleFunction · 0.85

Calls 1

Tested by

no test coverage detected