| 885 | } |
| 886 | |
| 887 | int QueuedNum(const HouseClass* pHouse, const TechnoTypeClass* pType) |
| 888 | { |
| 889 | const AbstractType absType = pType->WhatAmI(); |
| 890 | const BuildCat buildCat = (absType == AbstractType::BuildingType ? static_cast<const BuildingTypeClass*>(pType)->BuildCat : BuildCat::DontCare); |
| 891 | const FactoryClass* pFactory = pHouse->GetPrimaryFactory(absType, pType->Naval, buildCat); |
| 892 | int queued = 0; |
| 893 | |
| 894 | if (pFactory) |
| 895 | { |
| 896 | queued = pFactory->CountTotal(pType); |
| 897 | |
| 898 | if (const auto pObject = pFactory->Object) |
| 899 | { |
| 900 | if (pObject->GetType() == pType) |
| 901 | --queued; |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | return queued; |
| 906 | } |
| 907 | |
| 908 | void RemoveProduction(const HouseClass* pHouse, const TechnoTypeClass* pType, int num) |
| 909 | { |
no test coverage detected