Bazaar developer reference

CvPlot::isAdjacentToShallowWater() const

Defined in
CvPlot.cpp, line 1020
Class
CvPlot
Hook name
CivHooks::CvPlot_isAdjacentToShallowWater

Hooks

static bool BeforeCvPlot_isAdjacentToShallowWater(const CvPlot* self, bool& result);static void AfterCvPlot_isAdjacentToShallowWater(const CvPlot* self, bool& result);static bool ReplaceCvPlot_isAdjacentToShallowWater(bool (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_isAdjacentToShallowWater>(host, &BeforeCvPlot_isAdjacentToShallowWater);CivRegisterAfter<CivHooks::CvPlot_isAdjacentToShallowWater>(host, &AfterCvPlot_isAdjacentToShallowWater);CivRegisterReplace<CivHooks::CvPlot_isAdjacentToShallowWater>(host, &ReplaceCvPlot_isAdjacentToShallowWater);

Code

1020bool CvPlot::isAdjacentToShallowWater() const1021{1022	CvPlot* pAdjacentPlot;1023	int iI;10241025	TerrainTypes eShallowWater = (TerrainTypes) GC.getSHALLOW_WATER_TERRAIN();10261027	for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)1028	{1029		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));10301031		if(pAdjacentPlot != NULL)1032		{1033			if(pAdjacentPlot->getTerrainType() == eShallowWater)1034			{1035				return true;1036			}1037		}1038	}10391040	return false;1041}

Calls

Called by