CvTeamTechs::HasTech(TechTypes) const
- Defined in
- CvTechClasses.cpp, line 1957
- Class
- CvTeamTechs
- Hook name
CivHooks::CvTeamTechs_HasTech
Hooks
static bool BeforeCvTeamTechs_HasTech(const CvTeamTechs* self, TechTypes eIndex, bool& result);static void AfterCvTeamTechs_HasTech(const CvTeamTechs* self, TechTypes eIndex, bool& result);static bool ReplaceCvTeamTechs_HasTech(bool (*original)(const CvTeamTechs*, TechTypes), const CvTeamTechs* self, TechTypes eIndex);CivRegisterBefore<CivHooks::CvTeamTechs_HasTech>(host, &BeforeCvTeamTechs_HasTech);CivRegisterAfter<CivHooks::CvTeamTechs_HasTech>(host, &AfterCvTeamTechs_HasTech);CivRegisterReplace<CivHooks::CvTeamTechs_HasTech>(host, &ReplaceCvTeamTechs_HasTech);
Code
1956/// Accessor: does team have a tech?1957bool CvTeamTechs::HasTech(TechTypes eIndex) const1958{1959 if(eIndex == NO_TECH)1960 {1961 return true;1962 }19631964 CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");1965 CvAssertMsg(eIndex < GC.getNumTechInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");1966 CvAssertMsg(m_pabHasTech != NULL, "m_pabHasTech is not expected to be equal with NULL");1967 if(m_pabHasTech != NULL)1968 return m_pabHasTech[eIndex];1969 else1970 return false;1971}
Called by
88 functions in 29 files
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- CvBuilderTaskingAI::GetResourceWeight(ResourceTypes, ImprovementTypes, int)
- CvBuilderTaskingAI::UpdateRoutePlots()
- CvCity::GetIndividualPlotScore(const CvPlot *) const
- CvCity::GetResourceDemanded(bool) const
- CvCity::IsCanPurchase(bool, bool, UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- CvCity::PreKill(bool)
- CvCity::init(int, PlayerTypes, int, int, bool, bool, ReligionTypes, const char *)
- CvCity::processBuilding(BuildingTypes, int, bool, bool, bool)
- CvCityStrategyAI::DoTurn()
- CvCityCulture::GetBaseTourismBeforeModifiers()
- CvCityCulture::GetTourismTooltip()
- CvPlayerCulture::LogCultureData()
- CvDllNetMessageHandler::ResponseResearch(PlayerTypes, TechTypes, int, PlayerTypes, bool)
- CvDllTeam::GetTechs(TechTypes *, uint) const
- CvEconomicAI::DoTurn()
- EconomicAIHelpers::IsTestStrategy_NeedGuilds(CvPlayer *)
- EconomicAIHelpers::IsTestStrategy_NeedImprovement(CvPlayer *, YieldTypes)
- CvPlayerEspionage::BuildStealableTechList(PlayerTypes)
- CvGame::CheckGenerateArchaeology()
- CvGame::GetResearchLeftToTech(TeamTypes, TechTypes)
- CvGame::countKnownTechNumTeams(TechTypes)
- CvGame::initFreeState(CvGameInitialItemsOverrides &)
- CvGameQueries::GetLeastAdvancedUnitClassNobodyHas(bool)
- CvHomelandAI::PlotUpgradeMoves()
- CvMilitaryAI::FindBestUnitToScrap(bool, bool, int &)
- CvMilitaryAI::UpdateMilitaryStrategies()
- CvMinorCivAI::DoSpawnUnit(PlayerTypes, bool, bool)
- CvMinorCivAI::GetGoodTechPlayerDoesntHave(PlayerTypes, int) const
- CvMinorCivAI::GetNearbyResourceForQuest(PlayerTypes)
- CvPlayer::DoTechFromCityConquer(CvCity *)
- CvPlayer::DoUnresearchedTechBonusFromKill(CvUnit *, UnitTypes, int, int, int &)
- CvPlayer::HasTech(TechTypes) const
- CvPlayer::IsBuildBlockedByFeature(BuildTypes, FeatureTypes) const
- CvPlayer::calculateResearchModifier(TechTypes)
- CvPlayer::canBuild(const CvPlot *, BuildTypes, bool, bool, bool, bool) const
- CvPlayer::canConstruct(BuildingTypes, bool, bool, bool, CvString *) const
- CvPlayer::canCreate(ProjectTypes, bool, bool) const
- CvPlayer::canMaintain(ProcessTypes, bool) const
- CvPlayer::canReceiveGoody(CvPlot *, GoodyTypes, CvUnit *) const
- CvPlayer::canStealTech(PlayerTypes, TechTypes) const
- CvPlayer::canTrain(UnitTypes, bool, bool, bool, bool, CvString *) const
- CvPlayer::findPathLength(TechTypes, bool) const
- CvPlayer::getAdvancedStartImprovementCost(ImprovementTypes, bool, CvPlot *)
- CvPlayer::getAdvancedStartRouteCost(RouteTypes, bool, CvPlot *)
- CvPlayer::getAdvancedStartTechCost(TechTypes, bool)
- CvPlayer::getBestRoute(CvPlot *) const
- CvPlayer::pushResearch(TechTypes, bool)
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvPlayerAI::AI_chooseFreeTech()
- CvPlayerAI::AI_chooseResearch()
- CvPlot::SetImprovementPillaged(bool, bool)
- CvPlot::calculateYield(YieldTypes, bool)
- CvPlot::doImprovement()
- CvPlot::getNonObsoleteResourceType(TeamTypes) const
- CvPlot::getNumResourceForPlayer(PlayerTypes) const
- CvPlot::getResourceType(TeamTypes) const
- CvPlot::getYieldWithBuild(BuildTypes, YieldTypes, bool, PlayerTypes) const
- CvPlot::setImprovementType(ImprovementTypes, PlayerTypes)
- CvPlot::setOwner(PlayerTypes, int, bool, bool)
- CvPlayerPolicies::CanAdoptPolicy(PolicyTypes, bool) const
- CvUnitPromotions::GetAllowFeaturePassable(FeatureTypes) const
- CvUnitPromotions::GetAllowTerrainPassable(TerrainTypes) const
- CvGameReligions::GetAdjacentCityReligiousPressure(ReligionTypes, CvCity *, CvCity *, int &, bool)
- CvTeam::DoBarbarianTech()
- CvTeam::DoMinorCivTech()
- CvTeam::DoUpdateBestRoute()
- CvTeam::setHasTech(TechTypes, bool, PlayerTypes, bool, bool)
- CvTeam::shareItems(TeamTypes)
- CvTeam::updateTechShare(TechTypes)
- CvPlayerTechs::CanResearch(TechTypes, bool) const
- CvTeamTechs::ChangeResearchProgressPercent(TechTypes, int, PlayerTypes)
- CvTeamTechs::GetNumTechsKnown() const
- CvTeamTechs::HasResearchedAllTechs() const
- CvGameTrade::BuildTechDifference()
- CvPlayerTrade::GetNumTradeRoutesPossible()
- CvPlayerTrade::GetTradeRouteRange(DomainTypes, CvCity *)
- CvTraitEntry::IsEnabledByTech(TeamTypes)
- CvTraitEntry::IsObsoleteByTech(TeamTypes)
- CvUnit::CanUpgradeTo(UnitTypes, bool) const
- CvUnit::canAcquirePromotion(PromotionTypes) const
- CvUnit::canBuildRoute() const
- CvUnit::canPillage(const CvPlot *) const
- CvUnitMission::PushMission(UnitHandle, MissionTypes, int, int, int, bool, bool, MissionAITypes, CvPlot *, CvUnit *)
- CvLeague::CanProposeEnact(ResolutionTypes, PlayerTypes, int, CvString *)
- CvLeague::GetResearchMod(TechTypes)
- CvLuaTeam::lIsHasTech(lua_State *)
- CvLuaTeamTech::lHasTech(lua_State *)