Bazaar developer reference

CvPlot::seeThroughLevel(bool) const

Defined in
CvPlot.cpp, line 1464
Class
CvPlot
Hook name
CivHooks::CvPlot_seeThroughLevel

Hooks

static bool BeforeCvPlot_seeThroughLevel(const CvPlot* self, bool bIncludeShubbery, int& result);static void AfterCvPlot_seeThroughLevel(const CvPlot* self, bool bIncludeShubbery, int& result);static int ReplaceCvPlot_seeThroughLevel(int (*original)(const CvPlot*, bool), const CvPlot* self, bool bIncludeShubbery);CivRegisterBefore<CivHooks::CvPlot_seeThroughLevel>(host, &BeforeCvPlot_seeThroughLevel);CivRegisterAfter<CivHooks::CvPlot_seeThroughLevel>(host, &AfterCvPlot_seeThroughLevel);CivRegisterReplace<CivHooks::CvPlot_seeThroughLevel>(host, &ReplaceCvPlot_seeThroughLevel);

Code

1464int CvPlot::seeThroughLevel(bool bIncludeShubbery) const1465{1466	int iLevel;14671468	CvAssertMsg(getTerrainType() != NO_TERRAIN, "TerrainType is not assigned a valid value");14691470	iLevel = GC.getTerrainInfo(getTerrainType())->getSeeThroughLevel();14711472	if(bIncludeShubbery && getFeatureType() != NO_FEATURE)1473	{1474		iLevel += GC.getFeatureInfo(getFeatureType())->getSeeThroughChange();1475	}14761477	if(isMountain())1478	{1479		iLevel += GC.getMOUNTAIN_SEE_THROUGH_CHANGE();1480	}14811482	if(isHills())1483	{1484		iLevel += GC.getHILLS_SEE_THROUGH_CHANGE();1485	}14861487	if(isWater())1488	{1489		iLevel += GC.getSEAWATER_SEE_THROUGH_CHANGE();1490	}14911492	return iLevel;1493}

Calls

Called by