MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / FindBuildableIndex

Method FindBuildableIndex

src/Ext/House/Body.cpp:259–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259size_t HouseExt::FindBuildableIndex(
260 HouseClass const* const pHouse, int const idxParentCountry,
261 Iterator<TechnoTypeClass const*> const items, size_t const start)
262{
263 for (auto i = start; i < items.size(); ++i)
264 {
265 auto const pItem = items[i];
266
267 if (pHouse->CanExpectToBuild(pItem, idxParentCountry))
268 {
269 auto const pBld = abstract_cast<const BuildingTypeClass*>(pItem);
270 if (pBld && HouseExt::IsDisabledFromShell(pHouse, pBld))
271 continue;
272
273 return i;
274 }
275 }
276
277 return items.size();
278}
279
280int HouseExt::ActiveHarvesterCount(HouseClass* pThis)
281{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected