Bazaar developer reference

CvLuaPlot::PushMethods(lua_State *, int)

Defined in
Lua/CvLuaPlot.cpp, line 29
Class
CvLuaPlot
Hook name
CivHooks::CvLuaPlot_PushMethods

Hooks

static bool BeforeCvLuaPlot_PushMethods(lua_State* L, int t);static void AfterCvLuaPlot_PushMethods(lua_State* L, int t);static void ReplaceCvLuaPlot_PushMethods(void (*original)(lua_State*, int), lua_State* L, int t);CivRegisterBefore<CivHooks::CvLuaPlot_PushMethods>(host, &BeforeCvLuaPlot_PushMethods);CivRegisterAfter<CivHooks::CvLuaPlot_PushMethods>(host, &AfterCvLuaPlot_PushMethods);CivRegisterReplace<CivHooks::CvLuaPlot_PushMethods>(host, &ReplaceCvLuaPlot_PushMethods);

Code

29void CvLuaPlot::PushMethods(lua_State* L, int t)30{31	Method(CanHaveFeature);32	Method(GetFeatureType);33	Method(GetTerrainType);34#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_API_PLOT_BASED_DAMAGE)35	Method(GetTurnDamage);36#endif37	Method(IsRiver);38	Method(IsWater);39#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_ADJACENT_BLOCKADES)40	Method(IsBlockaded);41#endif42	Method(SetFeatureType);43	Method(SetTerrainType);4445	Method(IsNone);46	Method(Erase);47	Method(GetTeam);4849	Method(NukeExplosion);5051	Method(GetInlandCorner);5253	Method(UpdateFog);54	Method(UpdateVisibility);55	Method(IsAdjacentToArea);56	Method(ShareAdjacentArea);57	Method(IsAdjacentToLand);58	Method(IsAdjacentToShallowWater);59#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_PROMOTIONS_CROSS_ICE)60	Method(IsAdjacentToIce);61#endif62	Method(IsCoastalLand);6364	Method(IsWithinTeamCityRadius);6566	Method(IsLake);67	Method(IsFreshWater);6869	Method(IsRiverSide);70	Method(IsRiverConnection);71	Method(IsRiverCrossingFlowClockwise);7273	Method(GetNearestLandArea);74	Method(SeeFromLevel);75	Method(GetNearestLandPlot);76	Method(SeeThroughLevel);77	Method(CanHaveResource);78	Method(CanHaveImprovement);79	Method(CanBuild);80	Method(GetBuildTime);81	Method(GetBuildTurnsLeft);82	Method(GetBuildTurnsTotal);83	Method(GetFeatureProduction);8485	Method(GetBestDefender);86	Method(GetSelectedUnit);87	Method(GetUnitPower);8889	Method(DefenseModifier);90	Method(MovementCost);9192	Method(GetExtraMovePathCost);93	Method(ChangeExtraMovePathCost);9495	Method(IsAdjacentOwned);96	Method(IsAdjacentPlayer);97	Method(IsAdjacentTeam);9899	Method(IsOwned);100	Method(IsBarbarian);101	Method(IsRevealedBarbarian);102	Method(HasBarbarianCamp);103	Method(IsVisible);104	Method(IsActiveVisible);105	Method(IsVisibleToWatchingHuman);106	Method(IsAdjacentVisible);107	Method(IsAdjacentNonvisible);108	Method(IsAdjacentRevealed);109	Method(IsAdjacentNonrevealed);110111	Method(RemoveGoody);112	Method(IsGoody);113	Method(IsRevealedGoody);114115	Method(IsFriendlyTerritory);116117	Method(IsCity);118	Method(IsFriendlyCity);119#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_PASSABLE_FORTS)120	Method(IsFriendlyCityOrPassableImprovement);121#endif122	Method(IsEnemyCity);123	Method(IsBeingWorked);124125	Method(IsUnit);126	Method(IsVisibleEnemyDefender);127	Method(GetNumDefenders);128	Method(GetNumVisibleEnemyDefenders);129	Method(GetNumVisiblePotentialEnemyDefenders);130	Method(IsVisibleEnemyUnit);131	Method(IsVisibleOtherUnit);132	Method(GetNumFriendlyUnitsOfType);133	Method(IsFighting);134135#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_STACKING_RULES)136	Method(GetUnitLimit);137#endif138139	Method(IsRoute);140	Method(IsTradeRoute);141142	Method(IsValidDomainForLocation);143	Method(IsValidDomainForAction);144	Method(IsImpassable);145146#if defined(MOD_API_LUA_EXTENSIONS)147	Method(GetNumTradeRoutes);148#endif149150	Method(GetX);151	Method(GetY);152#if defined(MOD_API_LUA_EXTENSIONS)153	Method(GetXY);154	Method(GetIndex);155#endif156	Method(At);157	Method(GetPlotIndex);158	Method(GetLatitude);159	Method(Area);160	Method(WaterArea);161	Method(GetArea);162	Method(SetArea);163	Method(GetFeatureVariety);164165	Method(GetOwnershipDuration);166	Method(IsOwnershipScore);167	Method(SetOwnershipDuration);168	Method(ChangeOwnershipDuration);169170	Method(GetImprovementDuration);171	Method(SetImprovementDuration);172	Method(ChangeImprovementDuration);173174	Method(GetUpgradeProgress);175	Method(GetUpgradeTimeLeft);176177	Method(SetUpgradeProgress);178	Method(ChangeUpgradeProgress);179180	Method(GetCityRadiusCount);181	Method(IsCityRadius);182183	Method(IsStartingPlot);184	Method(SetStartingPlot);185	Method(IsNEOfRiver);186	Method(SetNEOfRiver);187	Method(IsWOfRiver);188	Method(SetWOfRiver);189	Method(IsNWOfRiver);190	Method(SetNWOfRiver);191	Method(GetRiverEFlowDirection);192	Method(GetRiverSEFlowDirection);193	Method(GetRiverSWFlowDirection);194195	Method(IsPotentialCityWork);196	Method(IsPotentialCityWorkForArea);197198	Method(GetOwner);199	Method(SetOwner);200	Method(GetPlotType);201	Method(IsFlatlands);202	Method(IsHills);203#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_PATHFINDER_TERRAFIRMA)204	Method(IsTerraFirma);205#endif206	Method(IsOpenGround);207	Method(IsRoughGround);208	Method(IsMountain);209210	Method(SetPlotType);211	Method(GetResourceType);212	Method(GetNonObsoleteResourceType);213	Method(SetResourceType);214	Method(GetNumResource);215	Method(SetNumResource);216	Method(ChangeNumResource);217218	Method(GetImprovementType);219	Method(SetImprovementType);220	Method(SetImprovementPillaged);221	Method(GetRouteType);222	Method(SetRouteType);223	Method(IsRoutePillaged);224#if defined(MOD_API_LUA_EXTENSIONS)225	Method(SetRoutePillaged);226#endif227228#if defined(MOD_API_LUA_EXTENSIONS)229	Method(GetPlayerThatBuiltImprovement);230	Method(SetPlayerThatBuiltImprovement);231	Method(GetPlayerResponsibleForImprovement);232	Method(SetPlayerResponsibleForImprovement);233	Method(GetPlayerResponsibleForRoute);234	Method(SetPlayerResponsibleForRoute);235	Method(GetPlayerThatClearedBarbCampHere);236	Method(SetPlayerThatClearedBarbCampHere);237#endif238239	Method(GetPlotCity);240	Method(GetWorkingCity);241	Method(GetWorkingCityOverride);242	Method(GetReconCount);243	Method(GetRiverCrossingCount);244	Method(GetYield);245	Method(CalculateNatureYield);246	Method(CalculateBestNatureYield);247	Method(CalculateTotalBestNatureYield);248	Method(CalculateImprovementYieldChange);249	Method(CalculateYield);250	Method(HasYield);251	Method(GetYieldWithBuild);252253	Method(CountNumAirUnits);254255	Method(GetFoundValue);256	Method(IsBestAdjacentFound);257258	Method(GetPlayerCityRadiusCount);259	Method(IsPlayerCityRadius);260261	Method(GetVisibilityCount);262	Method(ChangeVisibilityCount);263264	Method(GetRevealedOwner);265	Method(GetRevealedTeam);266267	Method(IsRiverCrossing);268	Method(IsRiverCrossingToPlot);269270	Method(IsRevealed);271	Method(SetRevealed);272	Method(GetRevealedImprovementType);273	Method(GetRevealedRouteType);274	Method(GetBuildProgress);275	Method(ChangeBuildProgress);276277	Method(GetInvisibleVisibilityCount);278	Method(IsInvisibleVisible);279	Method(ChangeInvisibleVisibilityCount);280281	Method(GetNumUnits);282	Method(GetUnit);283284	Method(GetNumLayerUnits);285	Method(GetLayerUnit);286287	Method(GetScriptData);288	Method(SetScriptData);289290	Method(GetActiveFogOfWarMode);291292	Method(IsImprovementPillaged);293294	Method(CanSeePlot);295296	Method(GetContinentArtType);297	Method(SetContinentArtType);298299	Method(IsResourceConnectedByImprovement);300301	Method(IsBuildRemovesFeature);302303#if defined(MOD_API_LUA_EXTENSIONS)304	Method(SetArchaeologicalRecord);305	Method(AddArchaeologicalRecord);306#endif307	Method(GetArchaeologyArtifactType);308	Method(GetArchaeologyArtifactEra);309	Method(GetArchaeologyArtifactPlayer1);310	Method(GetArchaeologyArtifactPlayer2);311	Method(GetArchaeologyArtifactWork);312	Method(HasWrittenArtifact);313314	Method(GetCityPurchaseID);315	Method(SetCityPurchaseID);316317#if defined(MOD_API_LUA_EXTENSIONS)318	Method(AddMessage);319	Method(AddPopupMessage);320#endif321322#if defined(MOD_API_LUA_EXTENSIONS)323	Method(IsCivilization);324	Method(HasFeature);325	Method(IsNaturalWonder);326	Method(HasAnyNaturalWonder);327	Method(HasNaturalWonder);328	Method(IsFeatureIce);329	Method(IsFeatureJungle);330	Method(IsFeatureMarsh);331	Method(IsFeatureOasis);332	Method(IsFeatureFloodPlains);333	Method(IsFeatureForest);334	Method(IsFeatureFallout);335	Method(IsFeatureAtoll);336	Method(IsFeatureLake);337	Method(IsFeatureRiver);338	Method(HasImprovement);339	Method(HasPlotType);340	Method(IsPlotMountain);341	Method(IsPlotMountains);342	Method(IsPlotHill);343	Method(IsPlotHills);344	Method(IsPlotLand);345	Method(IsPlotOcean);346	Method(HasResource);347	Method(HasRoute);348	Method(IsRouteRoad);349	Method(IsRouteRailroad);350	Method(HasTerrain);351	Method(IsTerrainGrass);352	Method(IsTerrainPlains);353	Method(IsTerrainDesert);354	Method(IsTerrainTundra);355	Method(IsTerrainSnow);356	Method(IsTerrainCoast);357	Method(IsTerrainOcean);358	Method(IsTerrainMountain);359	Method(IsTerrainMountains);360	Method(IsTerrainHill);361	Method(IsTerrainHills);362	Method(IsAdjacentToFeature);363	Method(IsWithinDistanceOfFeature);364	Method(IsAdjacentToImprovement);365	Method(IsWithinDistanceOfImprovement);366	Method(IsAdjacentToPlotType);367	Method(IsWithinDistanceOfPlotType);368	Method(IsAdjacentToResource);369	Method(IsWithinDistanceOfResource);370	Method(IsAdjacentToTerrain);371	Method(IsWithinDistanceOfTerrain);372#endif373}

Calls