CvCity::isFoodProduction() const
- Defined in
- CvCity.cpp, line 4443
- Class
- CvCity
- Hook name
CivHooks::CvCity_isFoodProduction
Hooks
static bool BeforeCvCity_isFoodProduction(const CvCity* self, bool& result);static void AfterCvCity_isFoodProduction(const CvCity* self, bool& result);static bool ReplaceCvCity_isFoodProduction(bool (*original)(const CvCity*), const CvCity* self);CivRegisterBefore<CivHooks::CvCity_isFoodProduction>(host, &BeforeCvCity_isFoodProduction);CivRegisterAfter<CivHooks::CvCity_isFoodProduction>(host, &AfterCvCity_isFoodProduction);CivRegisterReplace<CivHooks::CvCity_isFoodProduction>(host, &ReplaceCvCity_isFoodProduction);
Code
4443bool CvCity::isFoodProduction() const4444{4445 VALIDATE_OBJECT4446 const OrderData* pOrderNode = headOrderQueueNode();44474448 if(pOrderNode != NULL)4449 {4450 switch(pOrderNode->eOrderType)4451 {4452 case ORDER_TRAIN:4453 return isFoodProduction((UnitTypes)(pOrderNode->iData1));4454 break;44554456 case ORDER_CONSTRUCT:4457 case ORDER_CREATE:4458 case ORDER_PREPARE:4459 case ORDER_MAINTAIN:4460 break;44614462 default:4463 CvAssertMsg(false, "pOrderNode->eOrderType failed to match a valid option");4464 break;4465 }4466 }44674468 return false;4469}
Calls
Called by
- CvCity::foodDifferenceTimes100(bool, CvString *) const
- CvCity::getCurrentProductionDifference(bool, bool) const
- CvCity::getCurrentProductionDifferenceTimes100(bool, bool) const
- CvCity::getRawProductionDifference(bool, bool) const
- CvCity::getRawProductionDifferenceTimes100(bool, bool) const
- CvCity::popOrder(int, bool, bool)
- CvLuaCity::lIsFoodProduction(lua_State *)