Bazaar developer reference

CvGame::DoUpdateIndustrialRoute()

Defined in
CvGame.cpp, line 10271
Class
CvGame
Hook name
CivHooks::CvGame_DoUpdateIndustrialRoute

Hooks

static bool BeforeCvGame_DoUpdateIndustrialRoute(CvGame* self);static void AfterCvGame_DoUpdateIndustrialRoute(CvGame* self);static void ReplaceCvGame_DoUpdateIndustrialRoute(void (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_DoUpdateIndustrialRoute>(host, &BeforeCvGame_DoUpdateIndustrialRoute);CivRegisterAfter<CivHooks::CvGame_DoUpdateIndustrialRoute>(host, &AfterCvGame_DoUpdateIndustrialRoute);CivRegisterReplace<CivHooks::CvGame_DoUpdateIndustrialRoute>(host, &ReplaceCvGame_DoUpdateIndustrialRoute);

Code

10270/// What route type forms an industrial connection?10271void CvGame::DoUpdateIndustrialRoute()10272{10273	RouteTypes eIndustrialRoute = NO_ROUTE;1027410275	for(int iRouteLoop = 0; iRouteLoop < GC.getNumRouteInfos(); iRouteLoop++)10276	{10277		const RouteTypes eRoute = static_cast<RouteTypes>(iRouteLoop);10278		CvRouteInfo* pkRouteInfo = GC.getRouteInfo(eRoute);10279		if(pkRouteInfo)10280		{10281			if(pkRouteInfo->IsIndustrial())10282			{10283				eIndustrialRoute = eRoute;10284				break;10285			}10286		}10287	}1028810289	m_eIndustrialRoute = eIndustrialRoute;10290}

Calls

Called by