Bazaar developer reference

CvLuaCity::PushMethods(lua_State *, int)

Defined in
Lua/CvLuaCity.cpp, line 25
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_PushMethods

Hooks

static bool BeforeCvLuaCity_PushMethods(lua_State* L, int t);static void AfterCvLuaCity_PushMethods(lua_State* L, int t);static void ReplaceCvLuaCity_PushMethods(void (*original)(lua_State*, int), lua_State* L, int t);CivRegisterBefore<CivHooks::CvLuaCity_PushMethods>(host, &BeforeCvLuaCity_PushMethods);CivRegisterAfter<CivHooks::CvLuaCity_PushMethods>(host, &AfterCvLuaCity_PushMethods);CivRegisterReplace<CivHooks::CvLuaCity_PushMethods>(host, &ReplaceCvLuaCity_PushMethods);

Code

25void CvLuaCity::PushMethods(lua_State* L, int t)26{27	Method(IsNone);28	Method(Kill);2930	Method(CreateGreatGeneral);31	Method(CreateGreatAdmiral);3233	Method(DoTask);34	Method(ChooseProduction);35	Method(GetCityPlotIndex);36	Method(GetCityIndexPlot);37	Method(CanWork);38	Method(IsPlotBlockaded);39	Method(ClearWorkingOverride);40	Method(CountNumImprovedPlots);41	Method(CountNumWaterPlots);42	Method(CountNumRiverPlots);4344	Method(FindPopulationRank);45	Method(FindBaseYieldRateRank);46	Method(FindYieldRateRank);4748	Method(AllUpgradesAvailable);49	Method(IsWorldWondersMaxed);50	Method(IsTeamWondersMaxed);51	Method(IsNationalWondersMaxed);52	Method(IsBuildingsMaxed);5354	Method(CanTrainTooltip);55	Method(CanTrain);56	Method(CanConstructTooltip);57	Method(CanConstruct);58	Method(CanCreate);59	Method(CanPrepare);60	Method(CanMaintain);6162	Method(GetPurchaseUnitTooltip);63	Method(GetFaithPurchaseUnitTooltip);64	Method(GetPurchaseBuildingTooltip);65	Method(GetFaithPurchaseBuildingTooltip);6667	Method(CanJoin);68	Method(IsBuildingLocalResourceValid);6970	Method(GetResourceDemanded);71	Method(SetResourceDemanded);72	Method(DoPickResourceDemanded);7374	Method(GetFoodTurnsLeft);75	Method(IsProduction);76	Method(IsProductionLimited);77	Method(IsProductionUnit);78	Method(IsProductionBuilding);79	Method(IsProductionProject);80	Method(IsProductionSpecialist);81	Method(IsProductionProcess);8283	Method(CanContinueProduction);84	Method(GetProductionExperience);85	Method(AddProductionExperience);8687	Method(GetProductionUnit);88	Method(GetProductionUnitAI);89	Method(GetProductionBuilding);90	Method(GetProductionProject);91	Method(GetProductionSpecialist);92	Method(GetProductionProcess);93	//Method(GetProductionName);94	Method(GetProductionNameKey);95	Method(GetGeneralProductionTurnsLeft);96	Method(IsFoodProduction);97	Method(GetFirstUnitOrder);98	Method(GetFirstProjectOrder);99	Method(GetFirstSpecialistOrder);100101	Method(GetOrderFromQueue);102103	Method(GetNumTrainUnitAI);104	Method(GetFirstBuildingOrder);105	Method(IsUnitFoodProduction);106	Method(GetProduction);107	Method(GetProductionTimes100);108	Method(GetProductionNeeded);109	Method(GetUnitProductionNeeded);110	Method(GetBuildingProductionNeeded);111	Method(GetProjectProductionNeeded);112	Method(GetProductionTurnsLeft);113	Method(GetUnitProductionTurnsLeft);114	Method(GetBuildingProductionTurnsLeft);115	Method(GetProjectProductionTurnsLeft);116	Method(GetSpecialistProductionTurnsLeft);117#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_PROCESS_STOCKPILE)118	Method(GetProcessProductionTurnsLeft);119#endif120121	Method(CreateApolloProgram);122123	Method(IsCanPurchase);124#if defined(MOD_API_LUA_EXTENSIONS)125	Method(Purchase);126#endif127	Method(GetUnitPurchaseCost);128	Method(GetUnitFaithPurchaseCost);129	Method(GetBuildingPurchaseCost);130	Method(GetBuildingFaithPurchaseCost);131	Method(GetProjectPurchaseCost);132133	Method(SetProduction);134	Method(ChangeProduction);135136	Method(GetYieldModifierTooltip);137	Method(GetProductionModifier);138139	Method(GetCurrentProductionDifference);140	Method(GetRawProductionDifference);141	Method(GetCurrentProductionDifferenceTimes100);142	Method(GetRawProductionDifferenceTimes100);143	Method(GetUnitProductionModifier);144	Method(GetBuildingProductionModifier);145	Method(GetProjectProductionModifier);146	Method(GetSpecialistProductionModifier);147148	Method(GetExtraProductionDifference);149150	Method(CanHurry);151	Method(Hurry);152	Method(GetConscriptUnit);153	Method(GetConscriptPopulation);154	Method(ConscriptMinCityPopulation);155	Method(CanConscript);156	Method(Conscript);157	Method(GetResourceYieldRateModifier);158	Method(GetHandicapType);159	Method(GetCivilizationType);160	Method(GetPersonalityType);161	Method(GetArtStyleType);162	Method(GetCitySizeType);163164	Method(IsBarbarian);165	Method(IsHuman);166	Method(IsVisible);167168	Method(IsCapital);169	Method(IsOriginalCapital);170	Method(IsOriginalMajorCapital);171	Method(IsCoastal);172#if defined(MOD_API_LUA_EXTENSIONS)173	Method(IsAddsFreshWater);174#endif175176	Method(FoodConsumption);177	Method(FoodDifference);178	Method(FoodDifferenceTimes100);179	Method(GrowthThreshold);180	Method(ProductionLeft);181	Method(HurryCost);182	Method(HurryGold);183	Method(HurryPopulation);184	Method(HurryProduction);185	Method(MaxHurryPopulation);186187	Method(GetNumBuilding);188	Method(IsHasBuilding);189#if defined(MOD_API_LUA_EXTENSIONS)190	Method(GetNumBuildingClass);191	Method(IsHasBuildingClass);192#endif193	Method(GetNumActiveBuilding);194	Method(GetID);195	Method(GetX);196	Method(GetY);197#if defined(MOD_API_LUA_EXTENSIONS)198	Method(GetXY);199#endif200	Method(At);201	Method(AtPlot);202	Method(Plot);203	Method(Area);204	Method(WaterArea);205	Method(GetRallyPlot);206207	Method(CanBuyPlot);208	Method(CanBuyPlotAt);209	Method(GetNextBuyablePlot);210	Method(GetBuyablePlotList);211	Method(GetBuyPlotCost);212	Method(CanBuyAnyPlot);213214	Method(GetGarrisonedUnit);215216	Method(GetGameTurnFounded);217	Method(GetGameTurnAcquired);218	Method(GetGameTurnLastExpanded);219	Method(GetPopulation);220	Method(SetPopulation);221	Method(ChangePopulation);222	Method(GetRealPopulation);223224#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_CITY_AUTOMATON_WORKERS)225	Method(GetAutomatons);226	Method(SetAutomatons);227#endif228229	Method(GetHighestPopulation);230	Method(SetHighestPopulation);231	//Method(GetWorkingPopulation);232	//Method(GetSpecialistPopulation);233	Method(GetNumGreatPeople);234	Method(GetBaseGreatPeopleRate);235	Method(GetGreatPeopleRate);236	Method(GetTotalGreatPeopleRateModifier);237	Method(ChangeBaseGreatPeopleRate);238	Method(GetGreatPeopleRateModifier);239240	Method(GetJONSCultureStored);241	Method(SetJONSCultureStored);242	Method(ChangeJONSCultureStored);243	Method(GetJONSCultureLevel);244	Method(SetJONSCultureLevel);245	Method(ChangeJONSCultureLevel);246	Method(DoJONSCultureLevelIncrease);247	Method(GetJONSCultureThreshold);248249	Method(GetJONSCulturePerTurn);250251	Method(GetBaseJONSCulturePerTurn);252	Method(GetJONSCulturePerTurnFromBuildings);253	Method(ChangeJONSCulturePerTurnFromBuildings);254	Method(GetJONSCulturePerTurnFromPolicies);255	Method(ChangeJONSCulturePerTurnFromPolicies);256	Method(GetJONSCulturePerTurnFromSpecialists);257	Method(ChangeJONSCulturePerTurnFromSpecialists);258	Method(GetJONSCulturePerTurnFromGreatWorks);259	Method(GetJONSCulturePerTurnFromTraits);260	Method(GetJONSCulturePerTurnFromReligion);261#if defined(MOD_BUGFIX_LUA_API)262	Method(ChangeJONSCulturePerTurnFromReligion);263#endif264	Method(GetJONSCulturePerTurnFromLeagues);265266	Method(GetCultureRateModifier);267	Method(ChangeCultureRateModifier);268269#if defined(MOD_API_LUA_EXTENSIONS)270	Method(GetTourismRateModifier);271	Method(ChangeTourismRateModifier);272#endif273274	Method(GetNumGreatWorks);275	Method(GetNumGreatWorkSlots);276	Method(GetBaseTourism);277	Method(GetTourismMultiplier);278	Method(GetTourismTooltip);279	Method(GetFilledSlotsTooltip);280	Method(GetTotalSlotsTooltip);281	Method(ClearGreatWorks);282	Method(GetFaithBuildingTourism);283284	Method(IsThemingBonusPossible);285	Method(GetThemingBonus);286	Method(GetThemingTooltip);287288	Method(GetFaithPerTurn);289	Method(GetFaithPerTurnFromBuildings);290	Method(GetFaithPerTurnFromPolicies);291	Method(GetFaithPerTurnFromTraits);292	Method(GetFaithPerTurnFromReligion);293#if defined(MOD_BUGFIX_LUA_API)294	Method(ChangeFaithPerTurnFromReligion);295#endif296297	Method(IsReligionInCity);298	Method(IsHolyCityForReligion);299	Method(IsHolyCityAnyReligion);300301	Method(GetNumFollowers);302	Method(GetReligiousMajority);303	Method(GetSecondaryReligion);304	Method(GetSecondaryReligionPantheonBelief);305	Method(GetPressurePerTurn);306	Method(ConvertPercentFollowers);307	Method(AdoptReligionFully);308	Method(GetReligionBuildingClassHappiness);309	Method(GetReligionBuildingClassYieldChange);310	Method(GetLeagueBuildingClassYieldChange);311	Method(GetNumTradeRoutesAddingPressure);312313	Method(GetNumWorldWonders);314	Method(GetNumTeamWonders);315	Method(GetNumNationalWonders);316	Method(GetNumBuildings);317318	Method(GetWonderProductionModifier);319	Method(ChangeWonderProductionModifier);320321	Method(GetLocalResourceWonderProductionMod);322323#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_CITY_WORKING)324	Method(GetBuyPlotDistance);325	Method(GetWorkPlotDistance);326#endif327#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_BUILDINGS_CITY_WORKING)328	Method(GetCityWorkingChange);329	Method(ChangeCityWorkingChange);330#endif331332#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_BUILDINGS_CITY_AUTOMATON_WORKERS)333	Method(GetCityAutomatonWorkersChange);334	Method(ChangeCityAutomatonWorkersChange);335#endif336337	Method(ChangeHealRate);338339	Method(IsNoOccupiedUnhappiness);340341	Method(GetFood);342	Method(GetFoodTimes100);343	Method(SetFood);344	Method(ChangeFood);345	Method(GetFoodKept);346	Method(GetMaxFoodKeptPercent);347	Method(GetOverflowProduction);348	Method(SetOverflowProduction);349#if defined(MOD_API_LUA_EXTENSIONS)350	Method(ChangeOverflowProduction);351#endif352	Method(GetFeatureProduction);353	Method(SetFeatureProduction);354	Method(GetMilitaryProductionModifier);355	Method(GetSpaceProductionModifier);356	Method(GetBuildingDefense);357	Method(GetFreeExperience);358	Method(GetNukeModifier);359	//Method(GetFreeSpecialist);360361	Method(IsResistance);362	Method(GetResistanceTurns);363	Method(ChangeResistanceTurns);364365	Method(IsRazing);366	Method(GetRazingTurns);367	Method(ChangeRazingTurns);368369	Method(IsOccupied);370	Method(SetOccupied);371372	Method(IsPuppet);373	Method(SetPuppet);374375	Method(GetHappinessFromBuildings);376	Method(GetHappiness);377	Method(GetLocalHappiness);378379	Method(IsNeverLost);380	Method(SetNeverLost);381	Method(IsDrafted);382	Method(SetDrafted);383384	Method(IsBlockaded);385386	Method(GetWeLoveTheKingDayCounter);387	Method(SetWeLoveTheKingDayCounter);388	Method(ChangeWeLoveTheKingDayCounter);389390	Method(GetNumThingsProduced);391392	Method(IsProductionAutomated);393	Method(SetProductionAutomated);394	Method(SetCitySizeBoost);395	Method(GetOwner);396	Method(GetTeam);397	Method(GetPreviousOwner);398	Method(GetOriginalOwner);399	Method(GetSeaPlotYield);400	Method(GetRiverPlotYield);401	Method(GetLakePlotYield);402403	Method(GetBaseYieldRate);404405#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_GREATWORK_YIELDTYPES)406	Method(GetBaseYieldRateFromGreatWorks);407#endif408409	Method(GetBaseYieldRateFromTerrain);410	Method(ChangeBaseYieldRateFromTerrain);411412	Method(GetBaseYieldRateFromBuildings);413	Method(ChangeBaseYieldRateFromBuildings);414415	Method(GetBaseYieldRateFromSpecialists);416	Method(ChangeBaseYieldRateFromSpecialists);417418	Method(GetBaseYieldRateFromMisc);419	Method(ChangeBaseYieldRateFromMisc);420421	Method(GetBaseYieldRateFromReligion);422	Method(ChangeBaseYieldRateFromReligion);423424	Method(GetYieldPerPopTimes100);425426	Method(GetBaseYieldRateModifier);427	Method(GetYieldRate);428	Method(GetYieldRateTimes100);429	Method(GetYieldRateModifier);430431	Method(GetExtraSpecialistYield);432	Method(GetExtraSpecialistYieldOfType);433434	Method(GetDomainFreeExperience);435	Method(GetDomainProductionModifier);436437	Method(IsEverOwned);438439	Method(IsRevealed);440	Method(SetRevealed);441	Method(GetNameKey);442	Method(GetName);443	Method(SetName);444	Method(IsHasResourceLocal);445	Method(GetBuildingProduction);446	Method(SetBuildingProduction);447	Method(ChangeBuildingProduction);448	Method(GetBuildingProductionTime);449	Method(SetBuildingProductionTime);450	Method(ChangeBuildingProductionTime);451	Method(GetBuildingOriginalOwner);452	Method(GetBuildingOriginalTime);453	Method(GetUnitProduction);454	Method(SetUnitProduction);455	Method(ChangeUnitProduction);456457	Method(IsCanAddSpecialistToBuilding);458	Method(GetSpecialistUpgradeThreshold);459	Method(GetNumSpecialistsAllowedByBuilding);460	Method(GetSpecialistCount);461	Method(GetSpecialistGreatPersonProgress);462	Method(GetSpecialistGreatPersonProgressTimes100);463	Method(ChangeSpecialistGreatPersonProgressTimes100);464	Method(GetNumSpecialistsInBuilding);465	Method(DoReallocateCitizens);466	Method(DoVerifyWorkingPlots);467	Method(IsNoAutoAssignSpecialists);468469	Method(GetFocusType);470	Method(SetFocusType);471472	Method(IsForcedAvoidGrowth);473474	Method(GetUnitCombatFreeExperience);475	Method(GetFreePromotionCount);476	Method(IsFreePromotion);477	Method(GetSpecialistFreeExperience);478479	Method(UpdateStrengthValue);480	Method(GetStrengthValue);481482	Method(GetDamage);483	Method(SetDamage);484	Method(ChangeDamage);485	Method(GetMaxHitPoints);486#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_EVENTS_CITY_BOMBARD)487	Method(GetBombardRange);488#endif489	Method(CanRangeStrike);490	Method(CanRangeStrikeNow);491	Method(CanRangeStrikeAt);492	Method(HasPerformedRangedStrikeThisTurn);493	Method(RangeCombatUnitDefense);494	Method(RangeCombatDamage);495	Method(GetAirStrikeDefenseDamage);496497	Method(IsWorkingPlot);498	Method(AlterWorkingPlot);499	Method(IsForcedWorkingPlot);500	Method(GetNumRealBuilding);501	Method(SetNumRealBuilding);502	Method(GetNumFreeBuilding);503#if defined(MOD_API_LUA_EXTENSIONS)504	Method(SetNumFreeBuilding);505#endif506	Method(IsBuildingSellable);507	Method(GetSellBuildingRefund);508	Method(GetTotalBaseBuildingMaintenance);509	Method(GetBuildingGreatWork);510	Method(SetBuildingGreatWork);511	Method(IsHoldingGreatWork);512	Method(GetNumGreatWorksInBuilding);513514	Method(ClearOrderQueue);515	Method(PushOrder);516	Method(PopOrder);517	Method(GetOrderQueueLength);518519	Method(GetBuildingYieldChange);520	Method(SetBuildingYieldChange);521522	Method(GetBuildingEspionageModifier);523	Method(GetBuildingGlobalEspionageModifier);524525#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_API_ESPIONAGE)526	Method(HasDiplomat);527	Method(HasSpy);528	Method(HasCounterSpy);529	Method(GetCounterSpy);530#endif531532#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_RELIGION_CONVERSION_MODIFIERS)533	Method(GetBuildingConversionModifier);534	Method(GetBuildingGlobalConversionModifier);535#endif536537	Method(GetNumCityPlots);538	Method(CanPlaceUnitHere);539540	Method(GetSpecialistYield);541	Method(GetCultureFromSpecialist);542543	Method(GetNumForcedWorkingPlots);544545	Method(GetReligionCityRangeStrikeModifier);546547#if defined(MOD_API_LUA_EXTENSIONS)548	Method(AddMessage);549#endif550551#if defined(MOD_API_LUA_EXTENSIONS)552	Method(HasBelief);553	Method(HasBuilding);554	Method(HasBuildingClass);555	Method(HasAnyWonder);556	Method(HasWonder);557	Method(IsCivilization);558	Method(HasFeature);559	Method(HasWorkedFeature);560	Method(HasAnyNaturalWonder);561	Method(HasNaturalWonder);562	Method(HasImprovement);563	Method(HasWorkedImprovement);564	Method(HasPlotType);565	Method(HasWorkedPlotType);566	Method(HasAnyReligion);567	Method(HasReligion);568	Method(HasResource);569	Method(HasWorkedResource);570	Method(IsConnectedToCapital);571	Method(IsConnectedTo);572	Method(HasSpecialistSlot);573	Method(HasSpecialist);574	Method(HasTerrain);575	Method(HasWorkedTerrain);576	Method(HasAnyDomesticTradeRoute);577	Method(HasAnyInternationalTradeRoute);578	Method(HasTradeRouteToAnyCity);579	Method(HasTradeRouteTo);580	Method(HasTradeRouteFromAnyCity);581	Method(HasTradeRouteFrom);582	Method(IsOnFeature);583	Method(IsAdjacentToFeature);584	Method(IsWithinDistanceOfFeature);585	Method(IsOnImprovement);586	Method(IsAdjacentToImprovement);587	Method(IsWithinDistanceOfImprovement);588	Method(IsOnPlotType);589	Method(IsAdjacentToPlotType);590	Method(IsWithinDistanceOfPlotType);591	Method(IsOnResource);592	Method(IsAdjacentToResource);593	Method(IsWithinDistanceOfResource);594	Method(IsOnTerrain);595	Method(IsAdjacentToTerrain);596	Method(IsWithinDistanceOfTerrain);597	Method(CountFeature);598	Method(CountWorkedFeature);599	Method(CountImprovement);600	Method(CountWorkedImprovement);601	Method(CountPlotType);602	Method(CountWorkedPlotType);603	Method(CountResource);604	Method(CountWorkedResource);605	Method(CountTerrain);606	Method(CountWorkedTerrain);607#endif608}

Calls