MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / updateNeighborFacilityBuildTime

Method updateNeighborFacilityBuildTime

src/Basescape/BaseView.cpp:292–298  ·  view source on GitHub ↗

* Updates the neighborFacility's build time. This is for internal use only (reCalcQueuedBuildings()). * @param facility Pointer to a base facility. * @param neighbor Pointer to a neighboring base facility. */

Source from the content-addressed store, hash-verified

290 * @param neighbor Pointer to a neighboring base facility.
291 */
292void BaseView::updateNeighborFacilityBuildTime(BaseFacility* facility, BaseFacility* neighbor)
293{
294 if (0 != facility && 0 != neighbor
295 && neighbor->getBuildTime() > neighbor->getRules()->getBuildTime()
296 && facility->getBuildTime() + neighbor->getRules()->getBuildTime() < neighbor->getBuildTime())
297 neighbor->setBuildTime(facility->getBuildTime() + neighbor->getRules()->getBuildTime());
298}
299
300/**
301 * Keeps the animation timers running.

Callers

nothing calls this directly

Calls 3

setBuildTimeMethod · 0.80
getBuildTimeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected