CvPlot::isAdjacentToLand() const
- Defined in
- CvPlot.cpp, line 984
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_isAdjacentToLand
Hooks
static bool BeforeCvPlot_isAdjacentToLand(const CvPlot* self, bool& result);static void AfterCvPlot_isAdjacentToLand(const CvPlot* self, bool& result);static bool ReplaceCvPlot_isAdjacentToLand(bool (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_isAdjacentToLand>(host, &BeforeCvPlot_isAdjacentToLand);CivRegisterAfter<CivHooks::CvPlot_isAdjacentToLand>(host, &AfterCvPlot_isAdjacentToLand);CivRegisterReplace<CivHooks::CvPlot_isAdjacentToLand>(host, &ReplaceCvPlot_isAdjacentToLand);
Code
984bool CvPlot::isAdjacentToLand() const985{986 CvPlot* pAdjacentPlot;987 int iI;988989 for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)990 {991 pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));992993 if(pAdjacentPlot != NULL)994 {995 if(!(pAdjacentPlot->isWater()))996 {997 return true;998 }999 }1000 }10011002 return false;1003}
Calls
Called by
- CvBuilderTaskingAI::ShouldBuilderConsiderPlot(CvUnit *, CvPlot *)
- CvGame::initScoreCalculation()
- CvHomelandAI::ExecuteExplorerMoves()
- CvMap::DoPlaceNaturalWonders()
- CvMap::syncRandPlot(int, int, int, int)
- CvMap::updateAdjacency()
- CvPlot::canHaveResource(ResourceTypes, bool, bool) const
- CvPlot::setPlotType(PlotTypes, bool, bool, bool)
- CvUnit::canDisembark(const CvPlot *) const
- CvUnit::canDisembarkOnto(const CvPlot &, bool) const
- CvUnit::canDisembarkOnto(const CvPlot &, const CvPlot &, bool, bool) const
- CvWorldBuilderMapLoader::ValidateCoast()
- CvLuaPlot::lIsAdjacentToLand(lua_State *)