CyCity.cpp 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986
  1. //
  2. // Python wrapper class for CvCity
  3. //
  4. #include "CvGameCoreDLL.h"
  5. #include "CyCity.h"
  6. #include "CvCity.h"
  7. #include "CyPlot.h"
  8. #include "CyArea.h"
  9. #include "CyUnit.h"
  10. #include "CvDLLPythonIFaceBase.h"
  11. #include "CvGlobals.h"
  12. CyCity::CyCity() : m_pCity(NULL)
  13. {
  14. }
  15. CyCity::CyCity(CvCity* pCity) : m_pCity(pCity)
  16. {
  17. }
  18. void CyCity::kill()
  19. {
  20. if (m_pCity)
  21. m_pCity->kill(true);
  22. }
  23. /************************************************************************************************/
  24. /* REVOLUTION_MOD 03/29/09 jdog5000 */
  25. /* */
  26. /* */
  27. /************************************************************************************************/
  28. int CyCity::getRevolutionIndex()
  29. {
  30. if( m_pCity )
  31. return m_pCity->getRevolutionIndex();
  32. else
  33. return 0;
  34. }
  35. void CyCity::setRevolutionIndex( int iNewValue )
  36. {
  37. if( m_pCity )
  38. m_pCity->setRevolutionIndex(iNewValue);
  39. }
  40. void CyCity::changeRevolutionIndex( int iChange )
  41. {
  42. if( m_pCity )
  43. m_pCity->changeRevolutionIndex( iChange );
  44. }
  45. int CyCity::getLocalRevIndex()
  46. {
  47. if( m_pCity )
  48. return m_pCity->getLocalRevIndex();
  49. else
  50. return 0;
  51. }
  52. void CyCity::setLocalRevIndex( int iNewValue )
  53. {
  54. if( m_pCity )
  55. m_pCity->setLocalRevIndex( iNewValue );
  56. }
  57. void CyCity::changeLocalRevIndex( int iChange )
  58. {
  59. if( m_pCity )
  60. m_pCity->changeLocalRevIndex( iChange );
  61. }
  62. int CyCity::getRevIndexAverage() const
  63. {
  64. if( m_pCity )
  65. return m_pCity->getRevIndexAverage();
  66. else
  67. return 0;
  68. }
  69. void CyCity::setRevIndexAverage( int iNewValue )
  70. {
  71. if( m_pCity )
  72. m_pCity->setRevIndexAverage( iNewValue );
  73. }
  74. void CyCity::updateRevIndexAverage( )
  75. {
  76. if( m_pCity )
  77. m_pCity->updateRevIndexAverage( );
  78. }
  79. int CyCity::getReinforcementCounter()
  80. {
  81. if( m_pCity )
  82. return m_pCity->getReinforcementCounter();
  83. else
  84. return 0;
  85. }
  86. void CyCity::setReinforcementCounter( int iNewValue )
  87. {
  88. if( m_pCity )
  89. m_pCity->setReinforcementCounter(iNewValue);
  90. }
  91. void CyCity::changeReinforcementCounter( int iChange )
  92. {
  93. if( m_pCity )
  94. m_pCity->changeReinforcementCounter( iChange );
  95. }
  96. int CyCity::getRevolutionCounter()
  97. {
  98. if( m_pCity )
  99. return m_pCity->getRevolutionCounter();
  100. else
  101. return 0;
  102. }
  103. void CyCity::setRevolutionCounter( int iNewValue )
  104. {
  105. if( m_pCity )
  106. m_pCity->setRevolutionCounter(iNewValue);
  107. }
  108. void CyCity::changeRevolutionCounter( int iChange )
  109. {
  110. if( m_pCity )
  111. m_pCity->changeRevolutionCounter( iChange );
  112. }
  113. int CyCity::getRevIndexHappinessVal()
  114. {
  115. if( m_pCity )
  116. return m_pCity->getRevIndexHappinessVal();
  117. else
  118. return 0;
  119. }
  120. int CyCity::getRevIndexDistanceVal()
  121. {
  122. if( m_pCity )
  123. return m_pCity->getRevIndexDistanceVal();
  124. else
  125. return 0;
  126. }
  127. int CyCity::getRevIndexColonyVal()
  128. {
  129. if( m_pCity )
  130. return m_pCity->getRevIndexColonyVal();
  131. else
  132. return 0;
  133. }
  134. int CyCity::getRevIndexReligionVal()
  135. {
  136. if( m_pCity )
  137. return m_pCity->getRevIndexReligionVal();
  138. else
  139. return 0;
  140. }
  141. int CyCity::getRevIndexNationalityVal()
  142. {
  143. if( m_pCity )
  144. return m_pCity->getRevIndexNationalityVal();
  145. else
  146. return 0;
  147. }
  148. int CyCity::getRevIndexHealthVal()
  149. {
  150. if( m_pCity )
  151. return m_pCity->getRevIndexHealthVal();
  152. else
  153. return 0;
  154. }
  155. int CyCity::getRevIndexGarrisonVal()
  156. {
  157. if( m_pCity )
  158. return m_pCity->getRevIndexGarrisonVal();
  159. else
  160. return 0;
  161. }
  162. int CyCity::getRevIndexDisorderVal()
  163. {
  164. if( m_pCity )
  165. return m_pCity->getRevIndexDisorderVal();
  166. else
  167. return 0;
  168. }
  169. bool CyCity::isRecentlyAcquired()
  170. {
  171. if( m_pCity )
  172. return m_pCity->isRecentlyAcquired();
  173. else
  174. return false;
  175. }
  176. /************************************************************************************************/
  177. /* REVOLUTION_MOD END */
  178. /************************************************************************************************/
  179. // lfgr 09/2023 Extra revolution tags
  180. int CyCity::getTotalRevGarrisonValue() const
  181. {
  182. return m_pCity ? m_pCity->getTotalRevGarrisonValue() : 0;
  183. }
  184. void CyCity::createGreatPeople(int /*UnitTypes*/ eGreatPersonUnit, bool bIncrementThreshold, bool bIncrementExperience)
  185. {
  186. if (m_pCity)
  187. m_pCity->createGreatPeople((UnitTypes) eGreatPersonUnit, bIncrementThreshold, bIncrementExperience);
  188. }
  189. void CyCity::doTask(int /*TaskTypes*/ eTask, int iData1, int iData2, bool bOption)
  190. {
  191. if (m_pCity)
  192. m_pCity->doTask((TaskTypes)eTask, iData1, iData2, bOption);
  193. }
  194. void CyCity::chooseProduction(int /*UnitTypes*/ eTrainUnit, int /*BuildingTypes*/ eConstructBuilding, int /*ProjectTypes*/ eCreateProject, bool bFinish, bool bFront)
  195. {
  196. if (m_pCity)
  197. m_pCity->chooseProduction((UnitTypes) eTrainUnit, (BuildingTypes) eConstructBuilding, (ProjectTypes) eCreateProject, bFinish, bFront);
  198. }
  199. int CyCity::getCityPlotIndex(CyPlot* pPlot)
  200. {
  201. return m_pCity ? m_pCity->getCityPlotIndex(pPlot->getPlot()) : -1;
  202. }
  203. CyPlot* CyCity::getCityIndexPlot(int iIndex)
  204. {
  205. return m_pCity ? new CyPlot(m_pCity->getCityIndexPlot(iIndex)) : NULL;
  206. }
  207. bool CyCity::canWork(CyPlot* pPlot)
  208. {
  209. return m_pCity ? m_pCity->canWork(pPlot ? pPlot->getPlot() : NULL) : false;
  210. }
  211. void CyCity::clearWorkingOverride(int iIndex)
  212. {
  213. if (m_pCity)
  214. m_pCity->clearWorkingOverride(iIndex);
  215. }
  216. int CyCity::countNumImprovedPlots()
  217. {
  218. return m_pCity ? m_pCity->countNumImprovedPlots() : -1;
  219. }
  220. int CyCity::countNumWaterPlots()
  221. {
  222. return m_pCity ? m_pCity->countNumWaterPlots() : -1;
  223. }
  224. int CyCity::countNumRiverPlots()
  225. {
  226. return m_pCity ? m_pCity->countNumRiverPlots() : -1;
  227. }
  228. int CyCity::findPopulationRank()
  229. {
  230. return m_pCity ? m_pCity->findPopulationRank() : -1;
  231. }
  232. int CyCity::findBaseYieldRateRank(int /*YieldTypes*/ eYield)
  233. {
  234. return m_pCity ? m_pCity->findBaseYieldRateRank((YieldTypes) eYield) : -1;
  235. }
  236. int CyCity::findYieldRateRank(int /*YieldTypes*/ eYield)
  237. {
  238. return m_pCity ? m_pCity->findYieldRateRank((YieldTypes) eYield) : -1;
  239. }
  240. int CyCity::findCommerceRateRank(int /*CommerceTypes*/ eCommerce)
  241. {
  242. return m_pCity ? m_pCity->findCommerceRateRank((CommerceTypes) eCommerce) : -1;
  243. }
  244. int /*UnitTypes*/ CyCity::allUpgradesAvailable(int /*UnitTypes*/ eUnitType, int iUpgradeCount)
  245. {
  246. return m_pCity ? m_pCity->allUpgradesAvailable((UnitTypes) eUnitType, iUpgradeCount) : -1;
  247. }
  248. bool CyCity::isWorldWondersMaxed()
  249. {
  250. return m_pCity ? m_pCity->isWorldWondersMaxed() : false;
  251. }
  252. bool CyCity::isTeamWondersMaxed()
  253. {
  254. return m_pCity ? m_pCity->isTeamWondersMaxed() : false;
  255. }
  256. bool CyCity::isNationalWondersMaxed()
  257. {
  258. return m_pCity ? m_pCity->isNationalWondersMaxed() : false;
  259. }
  260. bool CyCity::isBuildingsMaxed()
  261. {
  262. return m_pCity ? m_pCity->isBuildingsMaxed() : false;
  263. }
  264. bool CyCity::canTrain( int /*UnitTypes*/ eUnit, bool bContinue, bool bTestVisible )
  265. {
  266. return m_pCity ? m_pCity->canTrain((UnitTypes)eUnit, bContinue, bTestVisible) : false;
  267. }
  268. bool CyCity::canConstruct( int /*BuildingTypes*/ eBuilding, bool bContinue, bool bTestVisible, bool bIgnoreCost)
  269. {
  270. return m_pCity ? m_pCity->canConstruct((BuildingTypes)eBuilding, bContinue, bTestVisible, bIgnoreCost) : false;
  271. }
  272. bool CyCity::canCreate( int /*ProjectTypes*/ eProject, bool bContinue, bool bTestVisible )
  273. {
  274. return m_pCity ? m_pCity->canCreate((ProjectTypes)eProject, bContinue, bTestVisible) : false;
  275. }
  276. bool CyCity::canMaintain( int /*ProcessTypes*/ eProcess, bool bContinue )
  277. {
  278. return m_pCity ? m_pCity->canMaintain((ProcessTypes)eProcess, bContinue) : false;
  279. }
  280. bool CyCity::canJoin()
  281. {
  282. return m_pCity ? m_pCity->canJoin() : false;
  283. }
  284. int CyCity::getFoodTurnsLeft()
  285. {
  286. return m_pCity ? m_pCity->getFoodTurnsLeft() : 0;
  287. }
  288. bool CyCity::isProduction()
  289. {
  290. return m_pCity ? m_pCity->isProduction() : false;
  291. }
  292. bool CyCity::isProductionLimited()
  293. {
  294. return m_pCity ? m_pCity->isProductionLimited() : false;
  295. }
  296. bool CyCity::isProductionUnit()
  297. {
  298. return m_pCity ? m_pCity->isProductionUnit() : false;
  299. }
  300. bool CyCity::isProductionBuilding()
  301. {
  302. return m_pCity ? m_pCity->isProductionBuilding() : false;
  303. }
  304. bool CyCity::isProductionProject()
  305. {
  306. return m_pCity ? m_pCity->isProductionProject() : false;
  307. }
  308. bool CyCity::isProductionProcess()
  309. {
  310. return m_pCity ? m_pCity->isProductionProcess() : false;
  311. }
  312. bool CyCity::canContinueProduction(OrderData order)
  313. {
  314. return m_pCity ? m_pCity->canContinueProduction(order) : false;
  315. }
  316. int CyCity::getProductionExperience(int /*UnitTypes*/ eUnit)
  317. {
  318. return m_pCity ? m_pCity->getProductionExperience((UnitTypes) eUnit) : -1;
  319. }
  320. void CyCity::addProductionExperience(CyUnit* pUnit, bool bConscript)
  321. {
  322. if (m_pCity)
  323. m_pCity->addProductionExperience(pUnit->getUnit(), bConscript);
  324. }
  325. int /*UnitTypes*/ CyCity::getProductionUnit()
  326. {
  327. return m_pCity ? m_pCity->getProductionUnit() : NO_UNIT;
  328. }
  329. int /*UnitAITypes*/ CyCity::getProductionUnitAI()
  330. {
  331. return m_pCity ? m_pCity->getProductionUnitAI() : NO_UNIT;
  332. }
  333. int /*BuildingTypes*/ CyCity::getProductionBuilding()
  334. {
  335. return m_pCity ? m_pCity->getProductionBuilding() : NO_BUILDING;
  336. }
  337. int /*ProjectTypes*/ CyCity::getProductionProject()
  338. {
  339. return m_pCity ? m_pCity->getProductionProject() : -1;
  340. }
  341. int /*ProcessTypes*/ CyCity::getProductionProcess()
  342. {
  343. return m_pCity ? m_pCity->getProductionProcess() : -1;
  344. }
  345. std::wstring CyCity::getProductionName()
  346. {
  347. return m_pCity ? m_pCity->getProductionName() : L"";
  348. }
  349. int CyCity::getGeneralProductionTurnsLeft()
  350. {
  351. return m_pCity ? m_pCity->getGeneralProductionTurnsLeft() : -1;
  352. }
  353. std::wstring CyCity::getProductionNameKey()
  354. {
  355. return m_pCity ? m_pCity->getProductionNameKey() : L"";
  356. }
  357. bool CyCity::isFoodProduction()
  358. {
  359. return m_pCity ? m_pCity->isFoodProduction() : false;
  360. }
  361. int CyCity::getFirstUnitOrder(int /*UnitTypes*/ eUnit)
  362. {
  363. return m_pCity ? m_pCity->getFirstUnitOrder((UnitTypes)eUnit) : -1;
  364. }
  365. int CyCity::getFirstBuildingOrder(int /*BuildingTypes*/ eBuilding)
  366. {
  367. return m_pCity ? m_pCity->getFirstBuildingOrder((BuildingTypes)eBuilding) : -1;
  368. }
  369. int CyCity::getFirstProjectOrder(int /*ProjectTypes*/ eProject)
  370. {
  371. return m_pCity ? m_pCity->getFirstProjectOrder((ProjectTypes)eProject) : -1;
  372. }
  373. int CyCity::getNumTrainUnitAI(int /*UnitAITypes*/ eUnitAI)
  374. {
  375. return m_pCity ? m_pCity->getNumTrainUnitAI((UnitAITypes) eUnitAI) : -1;
  376. }
  377. bool CyCity::isUnitFoodProduction(int /*UnitTypes*/ iUnit)
  378. {
  379. return m_pCity ? m_pCity->isFoodProduction((UnitTypes)iUnit) : false;
  380. }
  381. int CyCity::getProduction()
  382. {
  383. return m_pCity ? m_pCity->getProduction() : -1;
  384. }
  385. int CyCity::getProductionNeeded()
  386. {
  387. return m_pCity ? m_pCity->getProductionNeeded() : -1;
  388. }
  389. int CyCity::getProductionTurnsLeft()
  390. {
  391. return m_pCity ? m_pCity->getProductionTurnsLeft() : -1;
  392. }
  393. int CyCity::getUnitProductionTurnsLeft(int /*UnitTypes*/ iUnit, int iNum)
  394. {
  395. return m_pCity ? m_pCity->getProductionTurnsLeft((UnitTypes) iUnit, iNum) : -1;
  396. }
  397. int CyCity::getBuildingProductionTurnsLeft(int /*BuildingTypes*/ iBuilding, int iNum)
  398. {
  399. return m_pCity ? m_pCity->getProductionTurnsLeft((BuildingTypes) iBuilding, iNum) : -1;
  400. }
  401. int CyCity::getProjectProductionTurnsLeft(int /*ProjectTypes*/ eProject, int iNum)
  402. {
  403. return m_pCity ? m_pCity->getProductionTurnsLeft((ProjectTypes)eProject, iNum) : -1;
  404. }
  405. void CyCity::setProduction(int iNewValue)
  406. {
  407. if (m_pCity)
  408. m_pCity->setProduction(iNewValue);
  409. }
  410. void CyCity::changeProduction(int iChange)
  411. {
  412. if (m_pCity)
  413. m_pCity->changeProduction(iChange);
  414. }
  415. int CyCity::getProductionModifier()
  416. {
  417. return m_pCity ? m_pCity->getProductionModifier() : -1;
  418. }
  419. int CyCity::getCurrentProductionDifference(bool bIgnoreFood, bool bOverflow)
  420. {
  421. return m_pCity ? m_pCity->getCurrentProductionDifference(bIgnoreFood, bOverflow) : -1;
  422. }
  423. int CyCity::getUnitProductionModifier(int /*UnitTypes*/ iUnit)
  424. {
  425. return m_pCity ? m_pCity->getProductionModifier((UnitTypes)iUnit) : -1;
  426. }
  427. int CyCity::getBuildingProductionModifier(int /*BuildingTypes*/ iBuilding)
  428. {
  429. return m_pCity ? m_pCity->getProductionModifier((BuildingTypes)iBuilding) : -1;
  430. }
  431. int CyCity::getProjectProductionModifier(int /*ProjectTypes*/ eProject)
  432. {
  433. return m_pCity ? m_pCity->getProductionModifier((ProjectTypes)eProject) : -1;
  434. }
  435. int CyCity::getExtraProductionDifference(int iExtra)
  436. {
  437. return m_pCity ? m_pCity->getExtraProductionDifference(iExtra) : -1;
  438. }
  439. bool CyCity::canHurry(int /*HurryTypes*/ iHurry, bool bTestVisible)
  440. {
  441. return m_pCity ? m_pCity->canHurry((HurryTypes)iHurry, bTestVisible) : false;
  442. }
  443. void CyCity::hurry(int /*HurryTypes*/ iHurry)
  444. {
  445. if (m_pCity)
  446. m_pCity->hurry((HurryTypes)iHurry);
  447. }
  448. int /*UnitTypes*/ CyCity::getConscriptUnit()
  449. {
  450. return m_pCity ? (int)m_pCity->getConscriptUnit() : -1;
  451. }
  452. int CyCity::getConscriptPopulation()
  453. {
  454. return m_pCity ? m_pCity->getConscriptPopulation() : -1;
  455. }
  456. int CyCity::conscriptMinCityPopulation()
  457. {
  458. return m_pCity ? m_pCity->conscriptMinCityPopulation() : -1;
  459. }
  460. int CyCity::flatConscriptAngerLength()
  461. {
  462. return m_pCity ? m_pCity->flatConscriptAngerLength() : -1;
  463. }
  464. bool CyCity::canConscript()
  465. {
  466. return m_pCity ? m_pCity->canConscript() : false;
  467. }
  468. void CyCity::conscript()
  469. {
  470. if (m_pCity)
  471. m_pCity->conscript();
  472. }
  473. int CyCity::getBonusHealth(int /*BonusTypes*/ iBonus)
  474. {
  475. return m_pCity ? m_pCity->getBonusHealth((BonusTypes) iBonus) : -1;
  476. }
  477. int CyCity::getBonusHappiness(int /*BonusTypes*/ iBonus)
  478. {
  479. return m_pCity ? m_pCity->getBonusHappiness((BonusTypes) iBonus) : -1;
  480. }
  481. int CyCity::getBonusPower(int /*BonusTypes*/ eBonus, bool bDirty)
  482. {
  483. return m_pCity ? m_pCity->getBonusPower((BonusTypes)eBonus, bDirty) : -1;
  484. }
  485. int CyCity::getBonusYieldRateModifier(int /*YieldTypes*/ eIndex, int /*BonusTypes*/ eBonus)
  486. {
  487. return m_pCity ? m_pCity->getBonusYieldRateModifier((YieldTypes)eIndex, (BonusTypes)eBonus) : -1;
  488. }
  489. int /* HandicapTypes */ CyCity::getHandicapType()
  490. {
  491. return m_pCity ? m_pCity->getHandicapType() : NO_HANDICAP;
  492. }
  493. int /* CivilizationTypes */ CyCity::getCivilizationType()
  494. {
  495. return m_pCity ? m_pCity->getCivilizationType() : NO_CIVILIZATION;
  496. }
  497. int /* LeaderHeadTypes */ CyCity::getPersonalityType()
  498. {
  499. return m_pCity ? m_pCity->getPersonalityType() : NO_LEADER;
  500. }
  501. int /* ArtStyleTypes */ CyCity::getArtStyleType()
  502. {
  503. return m_pCity ? m_pCity->getArtStyleType() : -1;
  504. }
  505. int /* CitySizeTypes */ CyCity::getCitySizeType()
  506. {
  507. return m_pCity ? m_pCity->getCitySizeType() : -1;
  508. }
  509. bool CyCity::hasTrait(int /*TraitTypes*/ iTrait)
  510. {
  511. return m_pCity ? m_pCity->hasTrait((TraitTypes) iTrait) : false;
  512. }
  513. bool CyCity::isBarbarian()
  514. {
  515. return m_pCity ? m_pCity->isBarbarian() : false;
  516. }
  517. bool CyCity::isHuman()
  518. {
  519. return m_pCity ? m_pCity->isHuman() : false;
  520. }
  521. bool CyCity::isVisible(int /*TeamTypes*/ eTeam, bool bDebug)
  522. {
  523. return m_pCity ? m_pCity->isVisible((TeamTypes) eTeam, bDebug) : false;
  524. }
  525. bool CyCity::isCapital()
  526. {
  527. return m_pCity ? m_pCity->isCapital() : false;
  528. }
  529. bool CyCity::isCoastal(int iMinWaterSize)
  530. {
  531. return m_pCity ? m_pCity->isCoastal(iMinWaterSize) : false;
  532. }
  533. bool CyCity::isDisorder()
  534. {
  535. return m_pCity ? m_pCity->isDisorder() : false;
  536. }
  537. bool CyCity::isHolyCityByType(int /*ReligionTypes*/ iIndex)
  538. {
  539. return m_pCity ? m_pCity->isHolyCity((ReligionTypes) iIndex) : false;
  540. }
  541. bool CyCity::isHolyCity()
  542. {
  543. return m_pCity ? m_pCity->isHolyCity() : false;
  544. }
  545. bool CyCity::isHeadquartersByType(int /*CorporationTypes*/ iIndex)
  546. {
  547. return m_pCity ? m_pCity->isHeadquarters((CorporationTypes) iIndex) : false;
  548. }
  549. bool CyCity::isHeadquarters()
  550. {
  551. return m_pCity ? m_pCity->isHeadquarters() : false;
  552. }
  553. int CyCity::getOvercrowdingPercentAnger(int iExtra)
  554. {
  555. return m_pCity ? m_pCity->getOvercrowdingPercentAnger(iExtra) : -1;
  556. }
  557. int CyCity::getNoMilitaryPercentAnger()
  558. {
  559. return m_pCity ? m_pCity->getNoMilitaryPercentAnger() : -1;
  560. }
  561. int CyCity::getCulturePercentAnger()
  562. {
  563. return m_pCity ? m_pCity->getCulturePercentAnger() : -1;
  564. }
  565. int CyCity::getReligionPercentAnger()
  566. {
  567. return m_pCity ? m_pCity->getReligionPercentAnger() : -1;
  568. }
  569. int CyCity::getWarWearinessPercentAnger()
  570. {
  571. return m_pCity ? m_pCity->getWarWearinessPercentAnger() : -1;
  572. }
  573. /************************************************************************************************/
  574. /* REVOLUTION_MOD 04/26/08 jdog5000 */
  575. /* */
  576. /* */
  577. /************************************************************************************************/
  578. int CyCity::getRevRequestPercentAnger()
  579. {
  580. return m_pCity ? m_pCity->getRevRequestPercentAnger() : -1;
  581. }
  582. int CyCity::getRevIndexPercentAnger()
  583. {
  584. return m_pCity ? m_pCity->getRevIndexPercentAnger() : -1;
  585. }
  586. /************************************************************************************************/
  587. /* REVOLUTION_MOD END */
  588. /************************************************************************************************/
  589. int CyCity::getLargestCityHappiness()
  590. {
  591. return m_pCity ? m_pCity->getLargestCityHappiness() : -1;
  592. }
  593. int CyCity::unhappyLevel(int iExtra)
  594. {
  595. return m_pCity ? m_pCity->unhappyLevel(iExtra) : -1;
  596. }
  597. // REVOLUTION_REFACTORING 04/2021 lfgr: Ignores some modifiers
  598. int CyCity::unhappyLevelForRevIdx(int iExtra)
  599. {
  600. return m_pCity ? m_pCity->unhappyLevel( iExtra, true ) : -1;
  601. }
  602. int CyCity::happyLevel()
  603. {
  604. return m_pCity ? m_pCity->happyLevel() : -1;
  605. }
  606. int CyCity::angryPopulation(int iExtra)
  607. {
  608. return m_pCity ? m_pCity->angryPopulation(iExtra) : -1;
  609. }
  610. int CyCity::totalFreeSpecialists()
  611. {
  612. return m_pCity ? m_pCity->totalFreeSpecialists() : -1;
  613. }
  614. int CyCity::extraFreeSpecialists()
  615. {
  616. return m_pCity ? m_pCity->extraFreeSpecialists() : -1;
  617. }
  618. int CyCity::extraPopulation()
  619. {
  620. return m_pCity ? m_pCity->extraPopulation() : -1;
  621. }
  622. int CyCity::extraSpecialists()
  623. {
  624. return m_pCity ? m_pCity->extraSpecialists() : -1;
  625. }
  626. int CyCity::unhealthyPopulation(bool bNoAngry, int iExtra)
  627. {
  628. return m_pCity ? m_pCity->unhealthyPopulation(bNoAngry, iExtra) : -1;
  629. }
  630. int CyCity::totalGoodBuildingHealth()
  631. {
  632. return m_pCity ? m_pCity->totalGoodBuildingHealth() : -1;
  633. }
  634. int CyCity::totalBadBuildingHealth()
  635. {
  636. return m_pCity ? m_pCity->totalBadBuildingHealth() : -1;
  637. }
  638. int CyCity::goodHealth()
  639. {
  640. return m_pCity ? m_pCity->goodHealth() : -1;
  641. }
  642. int CyCity::badHealth(bool bNoAngry)
  643. {
  644. return m_pCity ? m_pCity->badHealth(bNoAngry) : -1;
  645. }
  646. int CyCity::healthRate(bool bNoAngry, int iExtra)
  647. {
  648. return m_pCity ? m_pCity->healthRate(bNoAngry, iExtra) : -1;
  649. }
  650. int CyCity::foodConsumption(bool bNoAngry, int iExtra)
  651. {
  652. return m_pCity ? m_pCity->foodConsumption(bNoAngry, iExtra) : -1;
  653. }
  654. int CyCity::foodDifference(bool bBottom)
  655. {
  656. return m_pCity ? m_pCity->foodDifference(bBottom) : -1;
  657. }
  658. int CyCity::growthThreshold()
  659. {
  660. return m_pCity ? m_pCity->growthThreshold() : -1;
  661. }
  662. int CyCity::productionLeft()
  663. {
  664. return m_pCity ? m_pCity->productionLeft() : -1;
  665. }
  666. int CyCity::hurryCost(bool bExtra)
  667. {
  668. return m_pCity ? m_pCity->hurryCost(bExtra) : -1;
  669. }
  670. int CyCity::hurryGold(int /*HurryTypes*/ iHurry)
  671. {
  672. return m_pCity ? m_pCity->hurryGold((HurryTypes)iHurry) : -1;
  673. }
  674. int CyCity::hurryPopulation(int /*HurryTypes*/ iHurry)
  675. {
  676. return m_pCity ? m_pCity->hurryPopulation((HurryTypes)iHurry) : -1;
  677. }
  678. int CyCity::hurryProduction(int /*HurryTypes*/ iHurry)
  679. {
  680. return m_pCity ? m_pCity->hurryProduction((HurryTypes)iHurry) : -1;
  681. }
  682. int CyCity::flatHurryAngerLength()
  683. {
  684. return m_pCity ? m_pCity->flatHurryAngerLength() : -1;
  685. }
  686. int CyCity::hurryAngerLength(int /*HurryTypes*/ iHurry)
  687. {
  688. return m_pCity ? m_pCity->hurryAngerLength((HurryTypes)iHurry) : -1;
  689. }
  690. int CyCity::maxHurryPopulation()
  691. {
  692. return m_pCity ? m_pCity->maxHurryPopulation() : -1;
  693. }
  694. int CyCity::cultureDistance(int iDX, int iDY)
  695. {
  696. return m_pCity ? m_pCity->cultureDistance(iDX, iDY) : -1;
  697. }
  698. int CyCity::cultureStrength(int /*PlayerTypes*/ ePlayer)
  699. {
  700. return m_pCity ? m_pCity->cultureStrength((PlayerTypes)ePlayer) : -1;
  701. }
  702. int CyCity::cultureGarrison(int /*PlayerTypes*/ ePlayer)
  703. {
  704. return m_pCity ? m_pCity->cultureGarrison((PlayerTypes)ePlayer) : -1;
  705. }
  706. int CyCity::getNumBuilding(int /*BuildingTypes*/ iIndex)
  707. {
  708. return m_pCity ? m_pCity->getNumBuilding((BuildingTypes) iIndex) : -1;
  709. }
  710. bool CyCity::isHasBuilding(int /*BuildingTypes*/ iIndex)
  711. {
  712. if (m_pCity)
  713. {
  714. if (m_pCity->getNumBuilding((BuildingTypes) iIndex) > 0)
  715. {
  716. return true;
  717. }
  718. }
  719. return false;
  720. }
  721. int CyCity::getNumActiveBuilding(int /*BuildingTypes*/ iIndex)
  722. {
  723. return m_pCity ? m_pCity->getNumActiveBuilding((BuildingTypes) iIndex) : -1;
  724. }
  725. int CyCity::getID()
  726. {
  727. return m_pCity ? m_pCity->getID() : -1;
  728. }
  729. int CyCity::getX()
  730. {
  731. return m_pCity ? m_pCity->getX_INLINE() : -1;
  732. }
  733. int CyCity::getY()
  734. {
  735. return m_pCity ? m_pCity->getY_INLINE() : -1;
  736. }
  737. bool CyCity::at(int iX, int iY)
  738. {
  739. return m_pCity ? m_pCity->at(iX, iY) : false;
  740. }
  741. bool CyCity::atPlot(CyPlot* pPlot)
  742. {
  743. return m_pCity ? m_pCity->at(pPlot->getPlot()) : false;
  744. }
  745. CyPlot* CyCity::plot()
  746. {
  747. return m_pCity ? new CyPlot(m_pCity->plot()) : NULL;
  748. }
  749. bool CyCity::isConnectedTo(CyCity* pCity)
  750. {
  751. return m_pCity ? m_pCity->isConnectedTo(pCity->getCity()) : false;
  752. }
  753. bool CyCity::isConnectedToCapital(int /*PlayerTypes*/ ePlayer)
  754. {
  755. return m_pCity ? m_pCity->isConnectedToCapital((PlayerTypes)ePlayer) : false;
  756. }
  757. CyArea* CyCity::area()
  758. {
  759. return m_pCity ? new CyArea(m_pCity->area()) : NULL;
  760. }
  761. CyArea* CyCity::waterArea()
  762. {
  763. return m_pCity ? new CyArea(m_pCity->waterArea()) : NULL;
  764. }
  765. CyPlot* CyCity::getRallyPlot()
  766. {
  767. return m_pCity ? new CyPlot(m_pCity->getRallyPlot()) : NULL;
  768. }
  769. int CyCity::getGameTurnFounded()
  770. {
  771. return m_pCity ? m_pCity->getGameTurnFounded() : -1;
  772. }
  773. int CyCity::getGameTurnAcquired()
  774. {
  775. return m_pCity ? m_pCity->getGameTurnAcquired() : -1;
  776. }
  777. int CyCity::getPopulation()
  778. {
  779. return m_pCity ? m_pCity->getPopulation() : -1;
  780. }
  781. void CyCity::setPopulation(int iNewValue)
  782. {
  783. if (m_pCity)
  784. m_pCity->setPopulation(iNewValue);
  785. }
  786. void CyCity::changePopulation(int iChange)
  787. {
  788. if (m_pCity)
  789. m_pCity->changePopulation(iChange);
  790. }
  791. long CyCity::getRealPopulation()
  792. {
  793. return m_pCity ? m_pCity->getRealPopulation() : -1;
  794. }
  795. int CyCity::getHighestPopulation()
  796. {
  797. return m_pCity ? m_pCity->getHighestPopulation() : -1;
  798. }
  799. void CyCity::setHighestPopulation(int iNewValue)
  800. {
  801. if (m_pCity)
  802. m_pCity->setHighestPopulation(iNewValue);
  803. }
  804. int CyCity::getWorkingPopulation()
  805. {
  806. return m_pCity ? m_pCity->getWorkingPopulation() : -1;
  807. }
  808. int CyCity::getSpecialistPopulation()
  809. {
  810. return m_pCity ? m_pCity->getSpecialistPopulation() : -1;
  811. }
  812. int CyCity::getNumGreatPeople()
  813. {
  814. return m_pCity ? m_pCity->getNumGreatPeople() : -1;
  815. }
  816. int CyCity::getBaseGreatPeopleRate()
  817. {
  818. return m_pCity ? m_pCity->getBaseGreatPeopleRate() : -1;
  819. }
  820. int CyCity::getGreatPeopleRate()
  821. {
  822. return m_pCity ? m_pCity->getGreatPeopleRate() : -1;
  823. }
  824. int CyCity::getTotalGreatPeopleRateModifier()
  825. {
  826. return m_pCity ? m_pCity->getTotalGreatPeopleRateModifier() : -1;
  827. }
  828. void CyCity::changeBaseGreatPeopleRate(int iChange)
  829. {
  830. if (m_pCity)
  831. m_pCity->changeBaseGreatPeopleRate(iChange);
  832. }
  833. int CyCity::getGreatPeopleRateModifier()
  834. {
  835. return m_pCity ? m_pCity->getGreatPeopleRateModifier() : -1;
  836. }
  837. // BUG - Building Additional Great People - start
  838. int CyCity::getAdditionalGreatPeopleRateByBuilding(int /*BuildingTypes*/ iBuilding)
  839. {
  840. return m_pCity ? m_pCity->getAdditionalGreatPeopleRateByBuilding((BuildingTypes)iBuilding) : -1;
  841. }
  842. int CyCity::getAdditionalBaseGreatPeopleRateByBuilding(int /*BuildingTypes*/ iBuilding)
  843. {
  844. return m_pCity ? m_pCity->getAdditionalBaseGreatPeopleRateByBuilding((BuildingTypes)iBuilding) : -1;
  845. }
  846. int CyCity::getAdditionalGreatPeopleRateModifierByBuilding(int /*BuildingTypes*/ iBuilding)
  847. {
  848. return m_pCity ? m_pCity->getAdditionalGreatPeopleRateModifierByBuilding((BuildingTypes)iBuilding) : -1;
  849. }
  850. // BUG - Building Additional Great People - end
  851. int CyCity::getGreatPeopleProgress()
  852. {
  853. return m_pCity ? m_pCity->getGreatPeopleProgress() : -1;
  854. }
  855. void CyCity::changeGreatPeopleProgress(int iChange)
  856. {
  857. if (m_pCity)
  858. m_pCity->changeGreatPeopleProgress(iChange);
  859. }
  860. int CyCity::getNumWorldWonders()
  861. {
  862. return m_pCity ? m_pCity->getNumWorldWonders() : -1;
  863. }
  864. int CyCity::getNumTeamWonders()
  865. {
  866. return m_pCity ? m_pCity->getNumTeamWonders() : -1;
  867. }
  868. int CyCity::getNumNationalWonders()
  869. {
  870. return m_pCity ? m_pCity->getNumNationalWonders() : -1;
  871. }
  872. int CyCity::getNumBuildings()
  873. {
  874. return m_pCity ? m_pCity->getNumBuildings() : -1;
  875. }
  876. bool CyCity::isGovernmentCenter()
  877. {
  878. return m_pCity ? m_pCity->isGovernmentCenter() : false;
  879. }
  880. // BUG - Building Saved Maintenance - start
  881. int CyCity::getSavedMaintenanceByBuilding(int /*BuildingTypes*/ iBuilding) const
  882. {
  883. return m_pCity ? m_pCity->getSavedMaintenanceByBuilding((BuildingTypes)iBuilding) : -1;
  884. }
  885. int CyCity::getSavedMaintenanceTimes100ByBuilding(int /*BuildingTypes*/ iBuilding) const
  886. {
  887. return m_pCity ? m_pCity->getSavedMaintenanceTimes100ByBuilding((BuildingTypes)iBuilding) : -1;
  888. }
  889. // BUG - Building Saved Maintenance - end
  890. int CyCity::getMaintenance() const
  891. {
  892. return m_pCity ? m_pCity->getMaintenance() : -1;
  893. }
  894. int CyCity::getMaintenanceTimes100() const
  895. {
  896. return m_pCity ? m_pCity->getMaintenanceTimes100() : -1;
  897. }
  898. int CyCity::calculateDistanceMaintenance() const
  899. {
  900. return m_pCity ? m_pCity->calculateDistanceMaintenance() : -1;
  901. }
  902. int CyCity::calculateDistanceMaintenanceTimes100() const
  903. {
  904. return m_pCity ? m_pCity->calculateDistanceMaintenanceTimes100() : -1;
  905. }
  906. int CyCity::calculateNumCitiesMaintenance() const
  907. {
  908. return m_pCity ? m_pCity->calculateNumCitiesMaintenance() : -1;
  909. }
  910. int CyCity::calculateNumCitiesMaintenanceTimes100() const
  911. {
  912. return m_pCity ? m_pCity->calculateNumCitiesMaintenanceTimes100() : -1;
  913. }
  914. int CyCity::calculateColonyMaintenance() const
  915. {
  916. return m_pCity ? m_pCity->calculateColonyMaintenance() : -1;
  917. }
  918. int CyCity::calculateColonyMaintenanceTimes100() const
  919. {
  920. return m_pCity ? m_pCity->calculateColonyMaintenanceTimes100() : -1;
  921. }
  922. int CyCity::calculateCorporationMaintenanceTimes100() const
  923. {
  924. return m_pCity ? m_pCity->calculateCorporationMaintenanceTimes100() : -1;
  925. }
  926. int CyCity::calculateCorporationMaintenance() const
  927. {
  928. return m_pCity ? m_pCity->calculateCorporationMaintenance() : -1;
  929. }
  930. int CyCity::getMaintenanceModifier()
  931. {
  932. return m_pCity ? m_pCity->getMaintenanceModifier() : -1;
  933. }
  934. int CyCity::getWarWearinessModifier()
  935. {
  936. return m_pCity ? m_pCity->getWarWearinessModifier() : -1;
  937. }
  938. int CyCity::getHurryAngerModifier()
  939. {
  940. return m_pCity ? m_pCity->getHurryAngerModifier() : -1;
  941. }
  942. int CyCity::getEspionageHealthCounter()
  943. {
  944. return m_pCity ? m_pCity->getEspionageHealthCounter() : -1;
  945. }
  946. void CyCity::changeEspionageHealthCounter(int iChange)
  947. {
  948. if (m_pCity)
  949. m_pCity->changeEspionageHealthCounter(iChange);
  950. }
  951. int CyCity::getEspionageHappinessCounter()
  952. {
  953. return m_pCity ? m_pCity->getEspionageHappinessCounter() : -1;
  954. }
  955. void CyCity::changeEspionageHappinessCounter(int iChange)
  956. {
  957. if (m_pCity)
  958. m_pCity->changeEspionageHappinessCounter(iChange);
  959. }
  960. void CyCity::changeHealRate(int iChange)
  961. {
  962. if (m_pCity)
  963. m_pCity->changeHealRate(iChange);
  964. }
  965. int CyCity::getFreshWaterGoodHealth()
  966. {
  967. return m_pCity ? m_pCity->getFreshWaterGoodHealth() : -1;
  968. }
  969. int CyCity::getFreshWaterBadHealth()
  970. {
  971. return m_pCity ? m_pCity->getFreshWaterBadHealth() : -1;
  972. }
  973. int CyCity::getBuildingGoodHealth()
  974. {
  975. return m_pCity ? m_pCity->getBuildingGoodHealth() : -1;
  976. }
  977. int CyCity::getBuildingBadHealth()
  978. {
  979. return m_pCity ? m_pCity->getBuildingBadHealth() : -1;
  980. }
  981. int CyCity::getFeatureGoodHealth()
  982. {
  983. return m_pCity ? m_pCity->getFeatureGoodHealth() : -1;
  984. }
  985. int CyCity::getFeatureBadHealth()
  986. {
  987. return m_pCity ? m_pCity->getFeatureBadHealth() : -1;
  988. }
  989. // BUG - Feature Health - start
  990. int CyCity::getAdditionalHealthByFeature(int /*FeatureTypes*/ eFeature, int iChange)
  991. {
  992. if (m_pCity)
  993. {
  994. int iGood = 0, iBad = 0;
  995. return m_pCity->getAdditionalHealthByFeature((FeatureTypes)eFeature, iChange, iGood, iBad);
  996. }
  997. else
  998. {
  999. return -1;
  1000. }
  1001. }
  1002. int CyCity::getAdditionalGoodHealthByFeature(int /*FeatureTypes*/ eFeature, int iChange)
  1003. {
  1004. if (m_pCity)
  1005. {
  1006. int iGood = 0, iBad = 0;
  1007. m_pCity->getAdditionalHealthByFeature((FeatureTypes)eFeature, iChange, iGood, iBad);
  1008. return iGood;
  1009. }
  1010. else
  1011. {
  1012. return -1;
  1013. }
  1014. }
  1015. int CyCity::getAdditionalBadHealthByFeature(int /*FeatureTypes*/ eFeature, int iChange)
  1016. {
  1017. if (m_pCity)
  1018. {
  1019. int iGood = 0, iBad = 0;
  1020. m_pCity->getAdditionalHealthByFeature((FeatureTypes)eFeature, iChange, iGood, iBad);
  1021. return iBad;
  1022. }
  1023. else
  1024. {
  1025. return -1;
  1026. }
  1027. }
  1028. // BUG - Feature Health - end
  1029. int CyCity::getBuildingHealth(int /*BuildingTypes*/ eBuilding)
  1030. {
  1031. return m_pCity ? m_pCity->getBuildingHealth((BuildingTypes)eBuilding) : -1;
  1032. }
  1033. // BUG - Building Additional Health - start
  1034. int CyCity::getAdditionalHealthByBuilding(int /*BuildingTypes*/ eBuilding)
  1035. {
  1036. if (m_pCity)
  1037. {
  1038. int iGood = 0, iBad = 0;
  1039. return m_pCity->getAdditionalHealthByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1040. }
  1041. else
  1042. {
  1043. return -1;
  1044. }
  1045. }
  1046. int CyCity::getAdditionalGoodHealthByBuilding(int /*BuildingTypes*/ eBuilding)
  1047. {
  1048. if (m_pCity)
  1049. {
  1050. int iGood = 0, iBad = 0;
  1051. m_pCity->getAdditionalHealthByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1052. return iGood;
  1053. }
  1054. else
  1055. {
  1056. return -1;
  1057. }
  1058. }
  1059. int CyCity::getAdditionalBadHealthByBuilding(int /*BuildingTypes*/ eBuilding)
  1060. {
  1061. if (m_pCity)
  1062. {
  1063. int iGood = 0, iBad = 0;
  1064. m_pCity->getAdditionalHealthByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1065. return iBad;
  1066. }
  1067. else
  1068. {
  1069. return -1;
  1070. }
  1071. }
  1072. int CyCity::getAdditionalSpoiledFoodByBuilding(int /*BuildingTypes*/ eBuilding)
  1073. {
  1074. if (m_pCity)
  1075. {
  1076. int iGood = 0, iBad = 0;
  1077. m_pCity->getAdditionalHealthByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1078. return m_pCity->getAdditionalSpoiledFood(iGood, iBad);
  1079. }
  1080. else
  1081. {
  1082. return -1;
  1083. }
  1084. }
  1085. int CyCity::getAdditionalStarvationByBuilding(int /*BuildingTypes*/ eBuilding)
  1086. {
  1087. if (m_pCity)
  1088. {
  1089. return m_pCity->getAdditionalStarvation(getAdditionalSpoiledFoodByBuilding(eBuilding));
  1090. }
  1091. else
  1092. {
  1093. return -1;
  1094. }
  1095. }
  1096. // BUG - Building Additional Health - end
  1097. int CyCity::getPowerGoodHealth()
  1098. {
  1099. return m_pCity ? m_pCity->getPowerGoodHealth() : -1;
  1100. }
  1101. int CyCity::getPowerBadHealth()
  1102. {
  1103. return m_pCity ? m_pCity->getPowerBadHealth() : -1;
  1104. }
  1105. int CyCity::getBonusGoodHealth()
  1106. {
  1107. return m_pCity ? m_pCity->getBonusGoodHealth() : -1;
  1108. }
  1109. int CyCity::getBonusBadHealth()
  1110. {
  1111. return m_pCity ? m_pCity->getBonusBadHealth() : -1;
  1112. }
  1113. int CyCity::getMilitaryHappiness()
  1114. {
  1115. return m_pCity ? m_pCity->getMilitaryHappiness() : -1;
  1116. }
  1117. int CyCity::getMilitaryHappinessUnits()
  1118. {
  1119. return m_pCity ? m_pCity->getMilitaryHappinessUnits() : -1;
  1120. }
  1121. int CyCity::getBuildingGoodHappiness()
  1122. {
  1123. return m_pCity ? m_pCity->getBuildingGoodHappiness() : -1;
  1124. }
  1125. int CyCity::getBuildingBadHappiness()
  1126. {
  1127. return m_pCity ? m_pCity->getBuildingBadHappiness() : -1;
  1128. }
  1129. int CyCity::getBuildingHappiness(int /*BuildingTypes*/ eBuilding)
  1130. {
  1131. return m_pCity ? m_pCity->getBuildingHappiness((BuildingTypes)eBuilding) : -1;
  1132. }
  1133. // BUG - Building Additional Happiness - start
  1134. int CyCity::getAdditionalHappinessByBuilding(int /*BuildingTypes*/ eBuilding)
  1135. {
  1136. if (m_pCity)
  1137. {
  1138. int iGood = 0, iBad = 0;
  1139. return m_pCity->getAdditionalHappinessByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1140. }
  1141. else
  1142. {
  1143. return -1;
  1144. }
  1145. }
  1146. int CyCity::getAdditionalGoodHappinessByBuilding(int /*BuildingTypes*/ eBuilding)
  1147. {
  1148. if (m_pCity)
  1149. {
  1150. int iGood = 0, iBad = 0;
  1151. m_pCity->getAdditionalHappinessByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1152. return iGood;
  1153. }
  1154. else
  1155. {
  1156. return -1;
  1157. }
  1158. }
  1159. int CyCity::getAdditionalBadHappinessByBuilding(int /*BuildingTypes*/ eBuilding)
  1160. {
  1161. if (m_pCity)
  1162. {
  1163. int iGood = 0, iBad = 0;
  1164. m_pCity->getAdditionalHappinessByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1165. return iBad;
  1166. }
  1167. else
  1168. {
  1169. return -1;
  1170. }
  1171. }
  1172. int CyCity::getAdditionalAngryPopulationByBuilding(int /*BuildingTypes*/ eBuilding)
  1173. {
  1174. if (m_pCity)
  1175. {
  1176. int iGood = 0, iBad = 0;
  1177. m_pCity->getAdditionalHappinessByBuilding((BuildingTypes)eBuilding, iGood, iBad);
  1178. return m_pCity->getAdditionalAngryPopuplation(iGood, iBad);
  1179. }
  1180. else
  1181. {
  1182. return -1;
  1183. }
  1184. }
  1185. // BUG - Building Additional Happiness - end
  1186. int CyCity::getExtraBuildingGoodHappiness()
  1187. {
  1188. return m_pCity ? m_pCity->getExtraBuildingGoodHappiness() : -1;
  1189. }
  1190. int CyCity::getExtraBuildingBadHappiness()
  1191. {
  1192. return m_pCity ? m_pCity->getExtraBuildingBadHappiness() : -1;
  1193. }
  1194. int CyCity::getFeatureGoodHappiness()
  1195. {
  1196. return m_pCity ? m_pCity->getFeatureGoodHappiness() : -1;
  1197. }
  1198. int CyCity::getFeatureBadHappiness()
  1199. {
  1200. return m_pCity ? m_pCity->getFeatureBadHappiness() : -1;
  1201. }
  1202. int CyCity::getBonusGoodHappiness()
  1203. {
  1204. return m_pCity ? m_pCity->getBonusGoodHappiness() : -1;
  1205. }
  1206. int CyCity::getBonusBadHappiness()
  1207. {
  1208. return m_pCity ? m_pCity->getBonusBadHappiness() : -1;
  1209. }
  1210. int CyCity::getReligionGoodHappiness()
  1211. {
  1212. return m_pCity ? m_pCity->getReligionGoodHappiness() : -1;
  1213. }
  1214. int CyCity::getReligionBadHappiness()
  1215. {
  1216. return m_pCity ? m_pCity->getReligionBadHappiness() : -1;
  1217. }
  1218. int CyCity::getReligionHappiness(int /*ReligionTypes*/ eReligion)
  1219. {
  1220. return m_pCity ? m_pCity->getReligionHappiness((ReligionTypes)eReligion) : -1;
  1221. }
  1222. int CyCity::getExtraHappiness()
  1223. {
  1224. return m_pCity ? m_pCity->getExtraHappiness() : -1;
  1225. }
  1226. void CyCity::changeExtraHappiness(int iChange)
  1227. {
  1228. if (m_pCity)
  1229. m_pCity->changeExtraHappiness(iChange);
  1230. }
  1231. int CyCity::getExtraHealth()
  1232. {
  1233. return m_pCity ? m_pCity->getExtraHealth() : -1;
  1234. }
  1235. void CyCity::changeExtraHealth(int iChange)
  1236. {
  1237. if (m_pCity)
  1238. m_pCity->changeExtraHealth(iChange);
  1239. }
  1240. int CyCity::getHurryAngerTimer()
  1241. {
  1242. return m_pCity ? m_pCity->getHurryAngerTimer() : -1;
  1243. }
  1244. void CyCity::changeHurryAngerTimer(int iChange)
  1245. {
  1246. if (m_pCity)
  1247. m_pCity->changeHurryAngerTimer(iChange);
  1248. }
  1249. /************************************************************************************************/
  1250. /* REVOLUTION_MOD 04/19/08 jdog5000 */
  1251. /* */
  1252. /* */
  1253. /************************************************************************************************/
  1254. int CyCity::getRevRequestAngerTimer()
  1255. {
  1256. return m_pCity ? m_pCity->getRevRequestAngerTimer() : -1;
  1257. }
  1258. void CyCity::changeRevRequestAngerTimer(int iChange)
  1259. {
  1260. if (m_pCity)
  1261. m_pCity->changeRevRequestAngerTimer(iChange);
  1262. }
  1263. int CyCity::getRevSuccessTimer()
  1264. {
  1265. return m_pCity ? m_pCity->getRevSuccessTimer() : -1;
  1266. }
  1267. void CyCity::changeRevSuccessTimer(int iChange)
  1268. {
  1269. if (m_pCity)
  1270. m_pCity->changeRevSuccessTimer(iChange);
  1271. }
  1272. /************************************************************************************************/
  1273. /* REVOLUTION_MOD END */
  1274. /************************************************************************************************/
  1275. int CyCity::getConscriptAngerTimer()
  1276. {
  1277. return m_pCity ? m_pCity->getConscriptAngerTimer() : -1;
  1278. }
  1279. void CyCity::changeConscriptAngerTimer(int iChange)
  1280. {
  1281. if (m_pCity)
  1282. m_pCity->changeConscriptAngerTimer(iChange);
  1283. }
  1284. int CyCity::getDefyResolutionAngerTimer()
  1285. {
  1286. return m_pCity ? m_pCity->getDefyResolutionAngerTimer() : -1;
  1287. }
  1288. void CyCity::changeDefyResolutionAngerTimer(int iChange)
  1289. {
  1290. if (m_pCity)
  1291. m_pCity->changeDefyResolutionAngerTimer(iChange);
  1292. }
  1293. int CyCity::flatDefyResolutionAngerLength()
  1294. {
  1295. return m_pCity ? m_pCity->flatDefyResolutionAngerLength() : -1;
  1296. }
  1297. int CyCity::getHappinessTimer()
  1298. {
  1299. return m_pCity ? m_pCity->getHappinessTimer() : -1;
  1300. }
  1301. void CyCity::changeHappinessTimer(int iChange)
  1302. {
  1303. if (m_pCity)
  1304. m_pCity->changeHappinessTimer(iChange);
  1305. }
  1306. bool CyCity::isNoUnhappiness()
  1307. {
  1308. return m_pCity ? m_pCity->isNoUnhappiness() : false;
  1309. }
  1310. bool CyCity::isNoUnhealthyPopulation()
  1311. {
  1312. return m_pCity ? m_pCity->isNoUnhealthyPopulation() : false;
  1313. }
  1314. bool CyCity::isBuildingOnlyHealthy()
  1315. {
  1316. return m_pCity ? m_pCity->isBuildingOnlyHealthy() : false;
  1317. }
  1318. int CyCity::getFood()
  1319. {
  1320. return m_pCity ? m_pCity->getFood() : -1;
  1321. }
  1322. void CyCity::setFood(int iNewValue)
  1323. {
  1324. if (m_pCity)
  1325. m_pCity->setFood(iNewValue);
  1326. }
  1327. void CyCity::changeFood(int iChange)
  1328. {
  1329. if (m_pCity)
  1330. m_pCity->changeFood(iChange);
  1331. }
  1332. int CyCity::getFoodKept()
  1333. {
  1334. return m_pCity ? m_pCity->getFoodKept() : -1;
  1335. }
  1336. int CyCity::getMaxFoodKeptPercent()
  1337. {
  1338. return m_pCity ? m_pCity->getMaxFoodKeptPercent() : -1;
  1339. }
  1340. int CyCity::getOverflowProduction()
  1341. {
  1342. return m_pCity ? m_pCity->getOverflowProduction() : -1;
  1343. }
  1344. void CyCity::setOverflowProduction(int iNewValue)
  1345. {
  1346. if (m_pCity)
  1347. m_pCity->setOverflowProduction(iNewValue);
  1348. }
  1349. int CyCity::getFeatureProduction()
  1350. {
  1351. return m_pCity ? m_pCity->getFeatureProduction() : -1;
  1352. }
  1353. void CyCity::setFeatureProduction(int iNewValue)
  1354. {
  1355. if (m_pCity)
  1356. m_pCity->setFeatureProduction(iNewValue);
  1357. }
  1358. int CyCity::getMilitaryProductionModifier()
  1359. {
  1360. return m_pCity ? m_pCity->getMilitaryProductionModifier() : -1;
  1361. }
  1362. int CyCity::getSpaceProductionModifier()
  1363. {
  1364. return m_pCity ? m_pCity->getSpaceProductionModifier() : -1;
  1365. }
  1366. int CyCity::getExtraTradeRoutes()
  1367. {
  1368. return m_pCity ? m_pCity->getExtraTradeRoutes() : -1;
  1369. }
  1370. void CyCity::changeExtraTradeRoutes(int iChange)
  1371. {
  1372. if (m_pCity)
  1373. m_pCity->changeExtraTradeRoutes(iChange);
  1374. }
  1375. int CyCity::getTradeRouteModifier()
  1376. {
  1377. return m_pCity ? m_pCity->getTradeRouteModifier() : -1;
  1378. }
  1379. int CyCity::getForeignTradeRouteModifier()
  1380. {
  1381. return m_pCity ? m_pCity->getForeignTradeRouteModifier() : -1;
  1382. }
  1383. int CyCity::getBuildingDefense()
  1384. {
  1385. return m_pCity ? m_pCity->getBuildingDefense() : -1;
  1386. }
  1387. // BUG - Building Additional Defense - start
  1388. int CyCity::getAdditionalDefenseByBuilding(int /*BuildingTypes*/ eBuilding)
  1389. {
  1390. return m_pCity ? m_pCity->getAdditionalDefenseByBuilding((BuildingTypes)eBuilding) : -1;
  1391. }
  1392. // BUG - Building Additional Defense - end
  1393. int CyCity::getBuildingBombardDefense()
  1394. {
  1395. return m_pCity ? m_pCity->getBuildingBombardDefense() : -1;
  1396. }
  1397. // BUG - Building Additional Bombard Defense - start
  1398. int CyCity::getAdditionalBombardDefenseByBuilding(int /*BuildingTypes*/ eBuilding)
  1399. {
  1400. return m_pCity ? m_pCity->getAdditionalBombardDefenseByBuilding((BuildingTypes)eBuilding) : -1;
  1401. }
  1402. // BUG - Building Additional Bombard Defense - end
  1403. int CyCity::getFreeExperience()
  1404. {
  1405. return m_pCity ? m_pCity->getFreeExperience() : -1;
  1406. }
  1407. int CyCity::getCurrAirlift()
  1408. {
  1409. return m_pCity ? m_pCity->getCurrAirlift() : -1;
  1410. }
  1411. int CyCity::getMaxAirlift()
  1412. {
  1413. return m_pCity ? m_pCity->getMaxAirlift() : -1;
  1414. }
  1415. int CyCity::getAirModifier()
  1416. {
  1417. return m_pCity ? m_pCity->getAirModifier() : -1;
  1418. }
  1419. int CyCity::getAirUnitCapacity(int /*TeamTypes*/ eTeam)
  1420. {
  1421. return m_pCity ? m_pCity->getAirUnitCapacity((TeamTypes)eTeam) : -1;
  1422. }
  1423. int CyCity::getNukeModifier()
  1424. {
  1425. return m_pCity ? m_pCity->getNukeModifier() : -1;
  1426. }
  1427. int CyCity::getFreeSpecialist()
  1428. {
  1429. return m_pCity ? m_pCity->getFreeSpecialist() : -1;
  1430. }
  1431. bool CyCity::isPower()
  1432. {
  1433. return m_pCity ? m_pCity->isPower() : false;
  1434. }
  1435. bool CyCity::isAreaCleanPower()
  1436. {
  1437. return m_pCity ? m_pCity->isAreaCleanPower() : false;
  1438. }
  1439. bool CyCity::isDirtyPower()
  1440. {
  1441. return m_pCity ? m_pCity->isDirtyPower() : false;
  1442. }
  1443. int CyCity::getDefenseDamage()
  1444. {
  1445. return m_pCity ? m_pCity->getDefenseDamage() : -1;
  1446. }
  1447. void CyCity::changeDefenseDamage(int iChange)
  1448. {
  1449. if (m_pCity)
  1450. m_pCity->changeDefenseDamage(iChange);
  1451. }
  1452. bool CyCity::isBombardable(CyUnit* pUnit)
  1453. {
  1454. return m_pCity ? m_pCity->isBombardable(pUnit->getUnit()) : false;
  1455. }
  1456. int CyCity::getNaturalDefense()
  1457. {
  1458. return m_pCity ? m_pCity->getNaturalDefense() : -1;
  1459. }
  1460. int CyCity::getTotalDefense(bool bIgnoreBuilding)
  1461. {
  1462. return m_pCity ? m_pCity->getTotalDefense(bIgnoreBuilding) : -1;
  1463. }
  1464. int CyCity::getDefenseModifier(bool bIgnoreBuilding)
  1465. {
  1466. return m_pCity ? m_pCity->getDefenseModifier(bIgnoreBuilding) : -1;
  1467. }
  1468. int CyCity::getOccupationTimer()
  1469. {
  1470. return m_pCity ? m_pCity->getOccupationTimer() : -1;
  1471. }
  1472. bool CyCity::isOccupation()
  1473. {
  1474. return m_pCity ? m_pCity->isOccupation() : false;
  1475. }
  1476. void CyCity::setOccupationTimer(int iNewValue)
  1477. {
  1478. if (m_pCity)
  1479. m_pCity->setOccupationTimer(iNewValue);
  1480. }
  1481. void CyCity::changeOccupationTimer(int iChange)
  1482. {
  1483. if (m_pCity)
  1484. m_pCity->changeOccupationTimer(iChange);
  1485. }
  1486. int CyCity::getCultureUpdateTimer()
  1487. {
  1488. return m_pCity ? m_pCity->getCultureUpdateTimer() : -1;
  1489. }
  1490. void CyCity::changeCultureUpdateTimer(int iChange)
  1491. {
  1492. if (m_pCity)
  1493. m_pCity->changeCultureUpdateTimer(iChange);
  1494. }
  1495. bool CyCity::isNeverLost()
  1496. {
  1497. return m_pCity ? m_pCity->isNeverLost() : false;
  1498. }
  1499. void CyCity::setNeverLost(int iNewValue)
  1500. {
  1501. if (m_pCity)
  1502. m_pCity->setNeverLost(iNewValue);
  1503. }
  1504. bool CyCity::isBombarded()
  1505. {
  1506. return m_pCity ? m_pCity->isBombarded(): false;
  1507. }
  1508. void CyCity::setBombarded(int iNewValue)
  1509. {
  1510. if (m_pCity)
  1511. m_pCity->setBombarded(iNewValue);
  1512. }
  1513. bool CyCity::isDrafted()
  1514. {
  1515. return m_pCity ? m_pCity->isDrafted(): false;
  1516. }
  1517. void CyCity::setDrafted(int iNewValue)
  1518. {
  1519. if (m_pCity)
  1520. m_pCity->setDrafted(iNewValue);
  1521. }
  1522. bool CyCity::isAirliftTargeted()
  1523. {
  1524. return m_pCity ? m_pCity->isAirliftTargeted(): false;
  1525. }
  1526. void CyCity::setAirliftTargeted(int iNewValue)
  1527. {
  1528. if (m_pCity)
  1529. m_pCity->setAirliftTargeted(iNewValue);
  1530. }
  1531. bool CyCity::isCitizensAutomated()
  1532. {
  1533. return m_pCity ? m_pCity->isCitizensAutomated() : false;
  1534. }
  1535. void CyCity::setCitizensAutomated(bool bNewValue)
  1536. {
  1537. if (m_pCity)
  1538. m_pCity->setCitizensAutomated(bNewValue);
  1539. }
  1540. bool CyCity::isProductionAutomated()
  1541. {
  1542. return m_pCity ? m_pCity->isProductionAutomated() : false;
  1543. }
  1544. void CyCity::setProductionAutomated(bool bNewValue)
  1545. {
  1546. if (m_pCity)
  1547. {
  1548. m_pCity->setProductionAutomated(bNewValue, false);
  1549. }
  1550. }
  1551. bool CyCity::isWallOverride() const
  1552. {
  1553. return m_pCity ? m_pCity->isWallOverride() : false;
  1554. }
  1555. void CyCity::setWallOverride(bool bOverride)
  1556. {
  1557. if (m_pCity)
  1558. m_pCity->setWallOverride(bOverride);
  1559. }
  1560. void CyCity::setCitySizeBoost(int iBoost)
  1561. {
  1562. if (m_pCity)
  1563. m_pCity->setCitySizeBoost(iBoost);
  1564. }
  1565. bool CyCity::isPlundered()
  1566. {
  1567. return m_pCity ? m_pCity->isPlundered() : false;
  1568. }
  1569. void CyCity::setPlundered(bool bNewValue)
  1570. {
  1571. if (m_pCity)
  1572. {
  1573. m_pCity->setPlundered(bNewValue);
  1574. }
  1575. }
  1576. int /*PlayerTypes*/ CyCity::getOwner()
  1577. {
  1578. return m_pCity ? m_pCity->getOwnerINLINE() : NO_PLAYER;
  1579. }
  1580. int /*TeamTypes*/ CyCity::getTeam()
  1581. {
  1582. return m_pCity ? m_pCity->getTeam() : NO_TEAM;
  1583. }
  1584. int /*PlayerTypes*/ CyCity::getPreviousOwner()
  1585. {
  1586. return m_pCity ? m_pCity->getPreviousOwner() : NO_PLAYER;
  1587. }
  1588. int /*PlayerTypes*/ CyCity::getOriginalOwner()
  1589. {
  1590. return m_pCity ? m_pCity->getOriginalOwner() : NO_PLAYER;
  1591. }
  1592. int /*CultureLevelTypes*/ CyCity::getCultureLevel()
  1593. {
  1594. return m_pCity ? m_pCity->getCultureLevel() : NO_CULTURELEVEL;
  1595. }
  1596. int CyCity::getCultureThreshold()
  1597. {
  1598. return m_pCity ? m_pCity->getCultureThreshold() : -1;
  1599. }
  1600. int CyCity::getSeaPlotYield(int /*YieldTypes*/ eIndex)
  1601. {
  1602. return m_pCity ? m_pCity->getSeaPlotYield((YieldTypes) eIndex) : -1;
  1603. }
  1604. int CyCity::getRiverPlotYield(int /*YieldTypes*/ eIndex)
  1605. {
  1606. return m_pCity ? m_pCity->getRiverPlotYield((YieldTypes) eIndex) : -1;
  1607. }
  1608. // BUG - Building Additional Yield - start
  1609. int CyCity::getAdditionalYieldByBuilding(int /*YieldTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1610. {
  1611. return m_pCity ? m_pCity->getAdditionalYieldByBuilding((YieldTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1612. }
  1613. int CyCity::getAdditionalBaseYieldRateByBuilding(int /*YieldTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1614. {
  1615. return m_pCity ? m_pCity->getAdditionalBaseYieldRateByBuilding((YieldTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1616. }
  1617. int CyCity::getAdditionalYieldRateModifierByBuilding(int /*YieldTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1618. {
  1619. return m_pCity ? m_pCity->getAdditionalYieldRateModifierByBuilding((YieldTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1620. }
  1621. // BUG - Building Additional Yield - end
  1622. int CyCity::getBaseYieldRate(int /*YieldTypes*/ eIndex)
  1623. {
  1624. return m_pCity ? m_pCity->getBaseYieldRate((YieldTypes)eIndex) : -1;
  1625. }
  1626. void CyCity::setBaseYieldRate(int /*YieldTypes*/ eIndex, int iNewValue)
  1627. {
  1628. if (m_pCity)
  1629. m_pCity->setBaseYieldRate((YieldTypes)eIndex, iNewValue);
  1630. }
  1631. void CyCity::changeBaseYieldRate(int /*YieldTypes*/ eIndex, int iNewValue)
  1632. {
  1633. if (m_pCity)
  1634. m_pCity->changeBaseYieldRate((YieldTypes)eIndex, iNewValue);
  1635. }
  1636. int CyCity::getBaseYieldRateModifier(int /*YieldTypes*/ eIndex, int iExtra)
  1637. {
  1638. return m_pCity ? m_pCity->getBaseYieldRateModifier((YieldTypes)eIndex, iExtra) : -1;
  1639. }
  1640. int CyCity::getYieldRate(int /*YieldTypes*/ eIndex)
  1641. {
  1642. return m_pCity ? m_pCity->getYieldRate((YieldTypes)eIndex) : -1;
  1643. }
  1644. int CyCity::getYieldRateModifier(int /*YieldTypes*/ eIndex)
  1645. {
  1646. return m_pCity ? m_pCity->getYieldRateModifier((YieldTypes)eIndex) : -1;
  1647. }
  1648. int CyCity::getTradeYield(int /*YieldTypes*/ eIndex)
  1649. {
  1650. return m_pCity ? m_pCity->getTradeYield((YieldTypes)eIndex) : -1;
  1651. }
  1652. int CyCity::totalTradeModifier()
  1653. {
  1654. return m_pCity ? m_pCity->totalTradeModifier() : -1;
  1655. }
  1656. // BUG - Fractional Trade Routes - start
  1657. int CyCity::calculateTradeProfitTimes100(CyCity* pCity)
  1658. {
  1659. return m_pCity ? m_pCity->calculateTradeProfitTimes100(pCity->getCity()) : -1;
  1660. }
  1661. // BUG - Fractional Trade Routes - end
  1662. int CyCity::calculateTradeProfit(CyCity* pCity)
  1663. {
  1664. return m_pCity ? m_pCity->calculateTradeProfit(pCity->getCity()) : -1;
  1665. }
  1666. int CyCity::calculateTradeYield(int /*YieldTypes*/ eIndex, int iTradeProfit)
  1667. {
  1668. return m_pCity ? m_pCity->calculateTradeYield((YieldTypes)eIndex, iTradeProfit) : -1;
  1669. }
  1670. int CyCity::getExtraSpecialistYield(int /*YieldTypes*/ eIndex)
  1671. {
  1672. return m_pCity ? m_pCity->getExtraSpecialistYield((YieldTypes) eIndex) : -1;
  1673. }
  1674. int CyCity::getExtraSpecialistYieldOfType(int /*YieldTypes*/ eIndex, int /*SpecialistTypes*/ eSpecialist)
  1675. {
  1676. return m_pCity ? m_pCity->getExtraSpecialistYield((YieldTypes) eIndex, (SpecialistTypes) eSpecialist) : -1;
  1677. }
  1678. int CyCity::getCommerceRate(int /*CommerceTypes*/ eIndex)
  1679. {
  1680. return m_pCity ? m_pCity->getCommerceRate((CommerceTypes)eIndex) : -1;
  1681. }
  1682. int CyCity::getCommerceRateTimes100(int /*CommerceTypes*/ eIndex)
  1683. {
  1684. return m_pCity ? m_pCity->getCommerceRateTimes100((CommerceTypes)eIndex) : -1;
  1685. }
  1686. int CyCity::getCommerceFromPercent(int /*CommerceTypes*/ eIndex, int iYieldRate)
  1687. {
  1688. return m_pCity ? m_pCity->getCommerceFromPercent((CommerceTypes)eIndex, iYieldRate) : -1;
  1689. }
  1690. int CyCity::getBaseCommerceRate(int /*CommerceTypes*/ eIndex)
  1691. {
  1692. return m_pCity ? m_pCity->getBaseCommerceRate((CommerceTypes)eIndex) : -1;
  1693. }
  1694. int CyCity::getBaseCommerceRateTimes100(int /*CommerceTypes*/ eIndex)
  1695. {
  1696. return m_pCity ? m_pCity->getBaseCommerceRateTimes100((CommerceTypes)eIndex) : -1;
  1697. }
  1698. int CyCity::getTotalCommerceRateModifier(int /*CommerceTypes*/ eIndex)
  1699. {
  1700. return m_pCity ? m_pCity->getTotalCommerceRateModifier((CommerceTypes)eIndex) : -1;
  1701. }
  1702. int CyCity::getProductionToCommerceModifier(int /*CommerceTypes*/ eIndex)
  1703. {
  1704. return m_pCity ? m_pCity->getProductionToCommerceModifier((CommerceTypes)eIndex) : -1;
  1705. }
  1706. int CyCity::getBuildingCommerce(int /*CommerceTypes*/ eIndex)
  1707. {
  1708. return m_pCity ? m_pCity->getBuildingCommerce((CommerceTypes)eIndex) : -1;
  1709. }
  1710. int CyCity::getBuildingCommerceByBuilding(int /*CommerceTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1711. {
  1712. return m_pCity ? m_pCity->getBuildingCommerceByBuilding((CommerceTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1713. }
  1714. // BUG - Building Additional Commerce - start
  1715. int CyCity::getAdditionalCommerceByBuilding(int /*CommerceTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1716. {
  1717. return m_pCity ? m_pCity->getAdditionalCommerceByBuilding((CommerceTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1718. }
  1719. int CyCity::getAdditionalCommerceTimes100ByBuilding(int /*CommerceTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1720. {
  1721. return m_pCity ? m_pCity->getAdditionalCommerceTimes100ByBuilding((CommerceTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1722. }
  1723. int CyCity::getAdditionalBaseCommerceRateByBuilding(int /*CommerceTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1724. {
  1725. return m_pCity ? m_pCity->getAdditionalBaseCommerceRateByBuilding((CommerceTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1726. }
  1727. int CyCity::getAdditionalCommerceRateModifierByBuilding(int /*CommerceTypes*/ eIndex, int /*BuildingTypes*/ iBuilding)
  1728. {
  1729. return m_pCity ? m_pCity->getAdditionalCommerceRateModifierByBuilding((CommerceTypes)eIndex, (BuildingTypes) iBuilding) : -1;
  1730. }
  1731. // BUG - Building Additional Commerce - end
  1732. int CyCity::getSpecialistCommerce(int /*CommerceTypes*/ eIndex)
  1733. {
  1734. return m_pCity ? m_pCity->getSpecialistCommerce((CommerceTypes)eIndex) : -1;
  1735. }
  1736. void CyCity::changeSpecialistCommerce(int /*CommerceTypes*/ eIndex, int iChange)
  1737. {
  1738. if (m_pCity)
  1739. m_pCity->changeSpecialistCommerce((CommerceTypes)eIndex, iChange);
  1740. }
  1741. int CyCity::getReligionCommerce(int /*CommerceTypes*/ eIndex)
  1742. {
  1743. return m_pCity ? m_pCity->getReligionCommerce((CommerceTypes)eIndex) : -1;
  1744. }
  1745. int CyCity::getReligionCommerceByReligion(int /*CommerceTypes*/ eIndex, int /*ReligionTypes*/ eReligion)
  1746. {
  1747. return m_pCity ? m_pCity->getReligionCommerceByReligion((CommerceTypes)eIndex, (ReligionTypes)eReligion) : -1;
  1748. }
  1749. int CyCity::getCorporationCommerce(int /*CommerceTypes*/ eIndex)
  1750. {
  1751. return m_pCity ? m_pCity->getCorporationCommerce((CommerceTypes)eIndex) : -1;
  1752. }
  1753. int CyCity::getCorporationCommerceByCorporation(int /*CommerceTypes*/ eIndex, int /*CorporationTypes*/ eCorporation)
  1754. {
  1755. return m_pCity ? m_pCity->getCorporationCommerceByCorporation((CommerceTypes)eIndex, (CorporationTypes)eCorporation) : -1;
  1756. }
  1757. int CyCity::getCorporationYield(int /*YieldTypes*/ eIndex)
  1758. {
  1759. return m_pCity ? m_pCity->getCorporationYield((YieldTypes)eIndex) : -1;
  1760. }
  1761. int CyCity::getCorporationYieldByCorporation(int /*YieldTypes*/ eIndex, int /*CorporationTypes*/ eCorporation)
  1762. {
  1763. return m_pCity ? m_pCity->getCorporationYieldByCorporation((YieldTypes)eIndex, (CorporationTypes)eCorporation) : -1;
  1764. }
  1765. int CyCity::getCommerceRateModifier(int /*CommerceTypes*/ eIndex)
  1766. {
  1767. return m_pCity ? m_pCity->getCommerceRateModifier((CommerceTypes)eIndex) : -1;
  1768. }
  1769. int CyCity::getCommerceHappinessPer(int /*CommerceTypes*/ eIndex)
  1770. {
  1771. return m_pCity ? m_pCity->getCommerceHappinessPer((CommerceTypes)eIndex) : -1;
  1772. }
  1773. int CyCity::getCommerceHappinessByType(int /*CommerceTypes*/ eIndex)
  1774. {
  1775. return m_pCity ? m_pCity->getCommerceHappinessByType((CommerceTypes) eIndex) : -1;
  1776. }
  1777. int CyCity::getCommerceHappiness()
  1778. {
  1779. return m_pCity ? m_pCity->getCommerceHappiness() : -1;
  1780. }
  1781. int CyCity::getDomainFreeExperience(int /*DomainTypes*/ eIndex)
  1782. {
  1783. return m_pCity ? m_pCity->getDomainFreeExperience((DomainTypes)eIndex) : -1;
  1784. }
  1785. int CyCity::getDomainProductionModifier(int /*DomainTypes*/ eIndex)
  1786. {
  1787. return m_pCity ? m_pCity->getDomainProductionModifier((DomainTypes)eIndex) : -1;
  1788. }
  1789. int CyCity::getCulture(int /*PlayerTypes*/ eIndex)
  1790. {
  1791. return m_pCity ? m_pCity->getCulture((PlayerTypes)eIndex) : -1;
  1792. }
  1793. int CyCity::getCultureTimes100(int /*PlayerTypes*/ eIndex)
  1794. {
  1795. return m_pCity ? m_pCity->getCultureTimes100((PlayerTypes)eIndex) : -1;
  1796. }
  1797. int CyCity::countTotalCultureTimes100()
  1798. {
  1799. return m_pCity ? m_pCity->countTotalCultureTimes100() : -1;
  1800. }
  1801. PlayerTypes CyCity::findHighestCulture()
  1802. {
  1803. return m_pCity ? m_pCity->findHighestCulture() : NO_PLAYER;
  1804. }
  1805. int CyCity::calculateCulturePercent(int /*PlayerTypes*/ eIndex)
  1806. {
  1807. return m_pCity ? m_pCity->calculateCulturePercent((PlayerTypes)eIndex) : -1;
  1808. }
  1809. int CyCity::calculateTeamCulturePercent(int /*TeamTypes*/ eIndex)
  1810. {
  1811. return m_pCity ? m_pCity->calculateTeamCulturePercent((TeamTypes)eIndex) : -1;
  1812. }
  1813. void CyCity::setCulture(int /*PlayerTypes*/ eIndex, int iNewValue, bool bPlots)
  1814. {
  1815. if (m_pCity)
  1816. m_pCity->setCulture((PlayerTypes)eIndex, iNewValue, bPlots, true);
  1817. }
  1818. void CyCity::setCultureTimes100(int /*PlayerTypes*/ eIndex, int iNewValue, bool bPlots)
  1819. {
  1820. if (m_pCity)
  1821. m_pCity->setCultureTimes100((PlayerTypes)eIndex, iNewValue, bPlots, true);
  1822. }
  1823. void CyCity::changeCulture(int /*PlayerTypes*/ eIndex, int iChange, bool bPlots)
  1824. {
  1825. if (m_pCity)
  1826. m_pCity->changeCulture((PlayerTypes)eIndex, iChange, bPlots, true);
  1827. }
  1828. void CyCity::changeCultureTimes100(int /*PlayerTypes*/ eIndex, int iChange, bool bPlots)
  1829. {
  1830. if (m_pCity)
  1831. m_pCity->changeCultureTimes100((PlayerTypes)eIndex, iChange, bPlots, true);
  1832. }
  1833. /************************************************************************************************/
  1834. /* REVOLUTION_MOD 01/01/08 jdog5000 */
  1835. /* */
  1836. /* */
  1837. /************************************************************************************************/
  1838. int CyCity::getNumRevolts(int playerIdx)
  1839. {
  1840. return m_pCity ? m_pCity->getNumRevolts((PlayerTypes)playerIdx) : -1;
  1841. }
  1842. void CyCity::changeNumRevolts(int playerIdx, int iChange)
  1843. {
  1844. if (m_pCity)
  1845. m_pCity->changeNumRevolts((PlayerTypes)playerIdx,iChange);
  1846. }
  1847. /************************************************************************************************/
  1848. /* REVOLUTION_MOD END */
  1849. /************************************************************************************************/
  1850. bool CyCity::isTradeRoute(int /*PlayerTypes*/ eIndex)
  1851. {
  1852. return m_pCity ? m_pCity->isTradeRoute((PlayerTypes)eIndex) : false;
  1853. }
  1854. bool CyCity::isEverOwned(int /*PlayerTypes*/ eIndex)
  1855. {
  1856. return m_pCity ? m_pCity->isEverOwned((PlayerTypes)eIndex) : false;
  1857. }
  1858. bool CyCity::isRevealed(int /*TeamTypes */eIndex, bool bDebug)
  1859. {
  1860. return m_pCity ? m_pCity->isRevealed((TeamTypes)eIndex, bDebug) : false;
  1861. }
  1862. void CyCity::setRevealed(int /*TeamTypes*/ eIndex, bool bNewValue)
  1863. {
  1864. if (m_pCity)
  1865. m_pCity->setRevealed((TeamTypes)eIndex, bNewValue);
  1866. }
  1867. bool CyCity::getEspionageVisibility(int /*TeamTypes */eIndex)
  1868. {
  1869. return m_pCity ? m_pCity->getEspionageVisibility((TeamTypes)eIndex) : false;
  1870. }
  1871. std::wstring CyCity::getName()
  1872. {
  1873. return m_pCity ? m_pCity->getName() : L"";
  1874. }
  1875. std::wstring CyCity::getNameForm(int iForm)
  1876. {
  1877. return m_pCity ? m_pCity->getName((uint)iForm) : L"";
  1878. }
  1879. std::wstring CyCity::getNameKey()
  1880. {
  1881. return m_pCity ? m_pCity->getNameKey() : L"";
  1882. }
  1883. void CyCity::setName(std::wstring szNewValue, bool bFound)
  1884. {
  1885. if (m_pCity)
  1886. m_pCity->setName(CvWString(szNewValue), bFound);
  1887. }
  1888. void CyCity::changeNoBonusCount(int /*BonusTypes*/ eBonus, int iChange)
  1889. {
  1890. if (m_pCity)
  1891. m_pCity->changeNoBonusCount((BonusTypes)eBonus, iChange);
  1892. }
  1893. bool CyCity::isNoBonus(int /*BonusTypes*/ eBonus)
  1894. {
  1895. return m_pCity ? m_pCity->isNoBonus((BonusTypes)eBonus) : false;
  1896. }
  1897. int CyCity::getFreeBonus(int /*BonusTypes*/ eIndex)
  1898. {
  1899. return m_pCity ? m_pCity->getFreeBonus((BonusTypes)eIndex) : -1;
  1900. }
  1901. void CyCity::changeFreeBonus(int /*BonusTypes*/ eIndex, int iChange)
  1902. {
  1903. if (m_pCity)
  1904. m_pCity->changeFreeBonus((BonusTypes)eIndex, iChange);
  1905. }
  1906. int CyCity::getNumBonuses(int /*BonusTypes*/ iBonus)
  1907. {
  1908. return m_pCity ? m_pCity->getNumBonuses((BonusTypes) iBonus) : -1;
  1909. }
  1910. bool CyCity::hasBonus(int /*BonusTypes */iBonus)
  1911. {
  1912. return m_pCity ? m_pCity->hasBonus((BonusTypes) iBonus) : false;
  1913. }
  1914. int CyCity::getBuildingProduction(int /*BuildingTypes*/ iIndex)
  1915. {
  1916. return m_pCity ? m_pCity->getBuildingProduction((BuildingTypes) iIndex) : -1;
  1917. }
  1918. void CyCity::setBuildingProduction(int /*BuildingTypes*/ iIndex, int iNewValue)
  1919. {
  1920. if (m_pCity)
  1921. m_pCity->setBuildingProduction((BuildingTypes) iIndex, iNewValue);
  1922. }
  1923. void CyCity::changeBuildingProduction(int /*BuildingTypes*/ iIndex, int iChange)
  1924. {
  1925. if (m_pCity)
  1926. m_pCity->changeBuildingProduction((BuildingTypes) iIndex, iChange);
  1927. }
  1928. int CyCity::getBuildingProductionTime(int /*BuildingTypes*/ eIndex)
  1929. {
  1930. return m_pCity ? m_pCity->getBuildingProductionTime((BuildingTypes)eIndex) : -1;
  1931. }
  1932. void CyCity::setBuildingProductionTime(int /*BuildingTypes*/ eIndex, int iNewValue)
  1933. {
  1934. if (m_pCity)
  1935. m_pCity->setBuildingProductionTime((BuildingTypes)eIndex, iNewValue);
  1936. }
  1937. void CyCity::changeBuildingProductionTime(int /*BuildingTypes*/ eIndex, int iChange)
  1938. {
  1939. if (m_pCity)
  1940. m_pCity->changeBuildingProductionTime((BuildingTypes) eIndex, iChange);
  1941. }
  1942. // BUG - Production Decay - start
  1943. bool CyCity::isBuildingProductionDecay(int /*BuildingTypes*/ eIndex)
  1944. {
  1945. return m_pCity ? m_pCity->isBuildingProductionDecay((BuildingTypes)eIndex) : false;
  1946. }
  1947. int CyCity::getBuildingProductionDecay(int /*BuildingTypes*/ eIndex)
  1948. {
  1949. return m_pCity ? m_pCity->getBuildingProductionDecay((BuildingTypes)eIndex) : 0;
  1950. }
  1951. int CyCity::getBuildingProductionDecayTurns(int /*BuildingTypes*/ eIndex)
  1952. {
  1953. return m_pCity ? m_pCity->getBuildingProductionDecayTurns((BuildingTypes)eIndex) : 0;
  1954. }
  1955. // BUG - Production Decay - end
  1956. int CyCity::getBuildingOriginalOwner(int /*BuildingTypes*/ iIndex)
  1957. {
  1958. return m_pCity ? m_pCity->getBuildingOriginalOwner((BuildingTypes) iIndex) : -1;
  1959. }
  1960. int CyCity::getBuildingOriginalTime(int /*BuildingTypes*/ iIndex)
  1961. {
  1962. return m_pCity ? m_pCity->getBuildingOriginalTime((BuildingTypes) iIndex) : -1;
  1963. }
  1964. int CyCity::getUnitProduction(int iIndex)
  1965. {
  1966. return m_pCity ? m_pCity->getUnitProduction((UnitTypes) iIndex) : -1;
  1967. }
  1968. void CyCity::setUnitProduction(int iIndex, int iNewValue)
  1969. {
  1970. if (m_pCity)
  1971. m_pCity->setUnitProduction((UnitTypes)iIndex, iNewValue);
  1972. }
  1973. void CyCity::changeUnitProduction(int /*UnitTypes*/ iIndex, int iChange)
  1974. {
  1975. if (m_pCity)
  1976. m_pCity->changeUnitProduction((UnitTypes) iIndex, iChange);
  1977. }
  1978. // BUG - Production Decay - start
  1979. int CyCity::getUnitProductionTime(int /*UnitTypes*/ eIndex)
  1980. {
  1981. return m_pCity ? m_pCity->getUnitProductionTime((UnitTypes)eIndex) : -1;
  1982. }
  1983. void CyCity::setUnitProductionTime(int /*UnitTypes*/ eIndex, int iNewValue)
  1984. {
  1985. if (m_pCity)
  1986. m_pCity->setUnitProductionTime((UnitTypes)eIndex, iNewValue);
  1987. }
  1988. void CyCity::changeUnitProductionTime(int /*UnitTypes*/ eIndex, int iChange)
  1989. {
  1990. if (m_pCity)
  1991. m_pCity->changeUnitProductionTime((UnitTypes) eIndex, iChange);
  1992. }
  1993. bool CyCity::isUnitProductionDecay(int /*UnitTypes*/ eIndex)
  1994. {
  1995. return m_pCity ? m_pCity->isUnitProductionDecay((UnitTypes)eIndex) : false;
  1996. }
  1997. int CyCity::getUnitProductionDecay(int /*UnitTypes*/ eIndex)
  1998. {
  1999. return m_pCity ? m_pCity->getUnitProductionDecay((UnitTypes)eIndex) : 0;
  2000. }
  2001. int CyCity::getUnitProductionDecayTurns(int /*UnitTypes*/ eIndex)
  2002. {
  2003. return m_pCity ? m_pCity->getUnitProductionDecayTurns((UnitTypes)eIndex) : 0;
  2004. }
  2005. // BUG - Production Decay - end
  2006. // BUG - Project Production - start
  2007. int CyCity::getProjectProduction(int /*ProjectTypes*/ iIndex)
  2008. {
  2009. return m_pCity ? m_pCity->getProjectProduction((ProjectTypes) iIndex) : -1;
  2010. }
  2011. void CyCity::setProjectProduction(int /*ProjectTypes*/ iIndex, int iNewValue)
  2012. {
  2013. if (m_pCity)
  2014. m_pCity->setProjectProduction((ProjectTypes) iIndex, iNewValue);
  2015. }
  2016. void CyCity::changeProjectProduction(int /*ProjectTypes*/ iIndex, int iChange)
  2017. {
  2018. if (m_pCity)
  2019. m_pCity->changeProjectProduction((ProjectTypes) iIndex, iChange);
  2020. }
  2021. // BUG - Project Production - end
  2022. int CyCity::getGreatPeopleUnitRate(int /*UnitTypes*/ iIndex)
  2023. {
  2024. return m_pCity ? m_pCity->getGreatPeopleUnitRate((UnitTypes) iIndex) : -1;
  2025. }
  2026. int CyCity::getGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex)
  2027. {
  2028. return m_pCity ? m_pCity->getGreatPeopleUnitProgress((UnitTypes) iIndex) : -1;
  2029. }
  2030. void CyCity::setGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex, int iNewValue)
  2031. {
  2032. if (m_pCity)
  2033. m_pCity->setGreatPeopleUnitProgress((UnitTypes) iIndex, iNewValue);
  2034. }
  2035. void CyCity::changeGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex, int iChange)
  2036. {
  2037. if (m_pCity)
  2038. m_pCity->changeGreatPeopleUnitProgress((UnitTypes) iIndex, iChange);
  2039. }
  2040. int CyCity::getSpecialistCount(int /*SpecialistTypes*/ eIndex)
  2041. {
  2042. return m_pCity ? m_pCity->getSpecialistCount((SpecialistTypes)eIndex) : -1;
  2043. }
  2044. void CyCity::alterSpecialistCount(int /*SpecialistTypes*/ eIndex, int iChange)
  2045. {
  2046. if (m_pCity)
  2047. m_pCity->alterSpecialistCount((SpecialistTypes)eIndex, iChange);
  2048. }
  2049. int CyCity::getMaxSpecialistCount(int /*SpecialistTypes*/ eIndex)
  2050. {
  2051. return m_pCity ? m_pCity->getMaxSpecialistCount((SpecialistTypes)eIndex) : -1;
  2052. }
  2053. bool CyCity::isSpecialistValid(int /*SpecialistTypes*/ eIndex, int iExtra)
  2054. {
  2055. return m_pCity ? m_pCity->isSpecialistValid((SpecialistTypes) eIndex, iExtra) : false;
  2056. }
  2057. int CyCity::getForceSpecialistCount(int /*SpecialistTypes*/ eIndex)
  2058. {
  2059. return m_pCity ? m_pCity->getForceSpecialistCount((SpecialistTypes)eIndex) : -1;
  2060. }
  2061. bool CyCity::isSpecialistForced()
  2062. {
  2063. return m_pCity ? m_pCity->isSpecialistForced() : false;
  2064. }
  2065. int CyCity::getImprovementFreeSpecialists(int /*ImprovementTypes*/ iIndex)
  2066. {
  2067. return m_pCity ? m_pCity->getImprovementFreeSpecialists((ImprovementTypes) iIndex) : -1;
  2068. }
  2069. int CyCity::getReligionInfluence(int /*ReligionTypes*/ iIndex)
  2070. {
  2071. return m_pCity ? m_pCity->getReligionInfluence((ReligionTypes) iIndex) : -1;
  2072. }
  2073. void CyCity::setForceSpecialistCount(int /*SpecialistTypes*/ eIndex, int iNewValue)
  2074. {
  2075. if (m_pCity)
  2076. m_pCity->setForceSpecialistCount((SpecialistTypes)eIndex, iNewValue);
  2077. }
  2078. void CyCity::changeForceSpecialistCount(int /*SpecialistTypes*/ eIndex, int iChange)
  2079. {
  2080. if (m_pCity)
  2081. m_pCity->changeForceSpecialistCount((SpecialistTypes)eIndex, iChange);
  2082. }
  2083. int CyCity::getFreeSpecialistCount(int /*SpecialistTypes*/ eIndex)
  2084. {
  2085. return m_pCity ? m_pCity->getFreeSpecialistCount((SpecialistTypes)eIndex) : -1;
  2086. }
  2087. void CyCity::setFreeSpecialistCount(int /*SpecialistTypes*/ eIndex, int iNewValue)
  2088. {
  2089. if (m_pCity)
  2090. m_pCity->setFreeSpecialistCount((SpecialistTypes)eIndex, iNewValue);
  2091. }
  2092. void CyCity::changeFreeSpecialistCount(int /*SpecialistTypes*/ eIndex, int iChange)
  2093. {
  2094. if (m_pCity)
  2095. m_pCity->changeFreeSpecialistCount((SpecialistTypes)eIndex, iChange);
  2096. }
  2097. int CyCity::getAddedFreeSpecialistCount(int /*SpecialistTypes*/ eIndex)
  2098. {
  2099. return m_pCity ? m_pCity->getAddedFreeSpecialistCount((SpecialistTypes)eIndex) : -1;
  2100. }
  2101. void CyCity::changeImprovementFreeSpecialists(int /*ImprovementTypes*/ iIndex, int iChange)
  2102. {
  2103. if (m_pCity)
  2104. m_pCity->changeImprovementFreeSpecialists((ImprovementTypes) iIndex, iChange);
  2105. }
  2106. void CyCity::changeReligionInfluence(int /*ReligionTypes*/ iIndex, int iChange)
  2107. {
  2108. if (m_pCity)
  2109. m_pCity->changeReligionInfluence((ReligionTypes) iIndex, iChange);
  2110. }
  2111. int CyCity::getCurrentStateReligionHappiness()
  2112. {
  2113. return m_pCity ? m_pCity->getCurrentStateReligionHappiness() : -1;
  2114. }
  2115. int CyCity::getStateReligionHappiness(int /*ReligionTypes*/ eIndex)
  2116. {
  2117. return m_pCity ? m_pCity->getStateReligionHappiness((ReligionTypes) eIndex) : -1;
  2118. }
  2119. void CyCity::changeStateReligionHappiness(int /*ReligionTypes*/ eIndex, int iChange)
  2120. {
  2121. if (m_pCity)
  2122. m_pCity->changeStateReligionHappiness((ReligionTypes) eIndex, iChange);
  2123. }
  2124. int CyCity::getUnitCombatFreeExperience(int /*UnitCombatTypes*/ eIndex)
  2125. {
  2126. return m_pCity ? m_pCity->getUnitCombatFreeExperience((UnitCombatTypes) eIndex) : -1;
  2127. }
  2128. int CyCity::getFreePromotionCount(int /*PromotionTypes*/ eIndex)
  2129. {
  2130. return m_pCity ? m_pCity->getFreePromotionCount((PromotionTypes) eIndex) : -1;
  2131. }
  2132. bool CyCity::isFreePromotion(int /*PromotionTypes*/ eIndex)
  2133. {
  2134. return m_pCity ? m_pCity->isFreePromotion((PromotionTypes) eIndex) : false;
  2135. }
  2136. int CyCity::getSpecialistFreeExperience() const
  2137. {
  2138. return m_pCity ? m_pCity->getSpecialistFreeExperience() : -1;
  2139. }
  2140. int CyCity::getEspionageDefenseModifier() const
  2141. {
  2142. return m_pCity ? m_pCity->getEspionageDefenseModifier() : 0;
  2143. }
  2144. bool CyCity::isWorkingPlotByIndex(int iIndex)
  2145. {
  2146. return m_pCity ? m_pCity->isWorkingPlot(iIndex) : false;
  2147. }
  2148. bool CyCity::isWorkingPlot(CyPlot* pPlot)
  2149. {
  2150. return m_pCity ? m_pCity->isWorkingPlot(pPlot->getPlot()) : false;
  2151. }
  2152. void CyCity::alterWorkingPlot(int iIndex)
  2153. {
  2154. if (m_pCity)
  2155. m_pCity->alterWorkingPlot(iIndex);
  2156. }
  2157. int CyCity::getNumRealBuilding(int /*BuildingTypes*/ iIndex)
  2158. {
  2159. return m_pCity ? m_pCity->getNumRealBuilding((BuildingTypes) iIndex) : -1;
  2160. }
  2161. void CyCity::setNumRealBuilding(int /*BuildingTypes*/ iIndex, int iNewValue)
  2162. {
  2163. if (m_pCity)
  2164. m_pCity->setNumRealBuilding((BuildingTypes) iIndex, iNewValue);
  2165. }
  2166. int CyCity::getNumFreeBuilding(int /*BuildingTypes*/ iIndex)
  2167. {
  2168. return m_pCity ? m_pCity->getNumFreeBuilding((BuildingTypes) iIndex) : -1;
  2169. }
  2170. bool CyCity::isHasReligion(int /*ReligionTypes*/ iIndex)
  2171. {
  2172. return m_pCity ? m_pCity->isHasReligion((ReligionTypes) iIndex) : false;
  2173. }
  2174. void CyCity::setHasReligion(int /*ReligionTypes*/ iIndex, bool bNewValue, bool bAnnounce, bool bArrows)
  2175. {
  2176. if (m_pCity)
  2177. m_pCity->setHasReligion((ReligionTypes) iIndex, bNewValue, bAnnounce, bArrows);
  2178. }
  2179. bool CyCity::isHasCorporation(int /*CorporationTypes*/ iIndex)
  2180. {
  2181. return m_pCity ? m_pCity->isHasCorporation((CorporationTypes) iIndex) : false;
  2182. }
  2183. void CyCity::setHasCorporation(int /*CorporationTypes*/ iIndex, bool bNewValue, bool bAnnounce, bool bArrows)
  2184. {
  2185. if (m_pCity)
  2186. m_pCity->setHasCorporation((CorporationTypes) iIndex, bNewValue, bAnnounce, bArrows);
  2187. }
  2188. bool CyCity::isActiveCorporation(int /*CorporationTypes*/ eCorporation)
  2189. {
  2190. return m_pCity ? m_pCity->isActiveCorporation((CorporationTypes) eCorporation) : false;
  2191. }
  2192. CyCity* CyCity::getTradeCity(int iIndex)
  2193. {
  2194. return m_pCity ? new CyCity(m_pCity->getTradeCity(iIndex)) : NULL;
  2195. }
  2196. int CyCity::getTradeRoutes()
  2197. {
  2198. return m_pCity ? m_pCity->getTradeRoutes() : -1;
  2199. }
  2200. void CyCity::clearOrderQueue()
  2201. {
  2202. if (m_pCity)
  2203. m_pCity->clearOrderQueue();
  2204. }
  2205. void CyCity::pushOrder(OrderTypes eOrder, int iData1, int iData2, bool bSave, bool bPop, bool bAppend, bool bForce)
  2206. {
  2207. if (m_pCity)
  2208. m_pCity->pushOrder(eOrder, iData1, iData2, bSave, bPop, bAppend, bForce);
  2209. }
  2210. void CyCity::popOrder(int iNum, bool bFinish, bool bChoose)
  2211. {
  2212. if (m_pCity)
  2213. m_pCity->popOrder(iNum, bFinish, bChoose);
  2214. }
  2215. int CyCity::getOrderQueueLength()
  2216. {
  2217. return m_pCity ? m_pCity->getOrderQueueLength() : -1;
  2218. }
  2219. OrderData* CyCity::getOrderFromQueue(int iIndex)
  2220. {
  2221. return m_pCity ? m_pCity->getOrderFromQueue(iIndex) : NULL;
  2222. }
  2223. void CyCity::setWallOverridePoints(const python::tuple& kPoints)
  2224. {
  2225. if (!m_pCity)
  2226. return;
  2227. float* pPointsData = NULL;
  2228. int iSeqLength = gDLL->getPythonIFace()->putSeqInArray(kPoints.ptr() /*src*/, &pPointsData /*dst*/);
  2229. // copy to pairs vector
  2230. std::vector< std::pair<float, float> > pointsVec;
  2231. pointsVec.reserve(iSeqLength/2);
  2232. int i;
  2233. for(i=0;i<iSeqLength;i+=2)
  2234. {
  2235. std::pair<float, float> pr(pPointsData[i], pPointsData[i+1]);
  2236. pointsVec.push_back(pr);
  2237. }
  2238. m_pCity->setWallOverridePoints(pointsVec);
  2239. delete [] pPointsData;
  2240. }
  2241. python::tuple CyCity::getWallOverridePoints() const
  2242. {
  2243. python::tuple tup = python::make_tuple();
  2244. if (m_pCity)
  2245. {
  2246. std::vector< std::pair<float, float> > pointsVec = m_pCity->getWallOverridePoints();
  2247. uint i;
  2248. for(i=0;i<pointsVec.size();i++)
  2249. tup += python::make_tuple(pointsVec[i].first, pointsVec[i].second);
  2250. }
  2251. return tup;
  2252. }
  2253. bool CyCity::AI_avoidGrowth()
  2254. {
  2255. return m_pCity ? m_pCity->AI_avoidGrowth() : false;
  2256. }
  2257. bool CyCity::AI_isEmphasize(int iEmphasizeType)
  2258. {
  2259. return m_pCity ? m_pCity->AI_isEmphasize((EmphasizeTypes)iEmphasizeType) : false;
  2260. }
  2261. int CyCity::AI_countBestBuilds(CyArea* pArea)
  2262. {
  2263. return m_pCity ? m_pCity->AI_countBestBuilds(pArea->getArea()) : -1;
  2264. }
  2265. int CyCity::AI_cityValue()
  2266. {
  2267. return m_pCity ? m_pCity->AI_cityValue() : -1;
  2268. }
  2269. std::string CyCity::getScriptData() const
  2270. {
  2271. return m_pCity ? m_pCity->getScriptData() : "";
  2272. }
  2273. void CyCity::setScriptData(std::string szNewValue)
  2274. {
  2275. if (m_pCity)
  2276. m_pCity->setScriptData(szNewValue);
  2277. }
  2278. int CyCity::visiblePopulation(void)
  2279. {
  2280. if ( m_pCity )
  2281. {
  2282. return m_pCity->visiblePopulation();
  2283. }
  2284. return 0;
  2285. }
  2286. int CyCity::getBuildingYieldChange(int /*BuildingClassTypes*/ eBuildingClass, int /*YieldTypes*/ eYield) const
  2287. {
  2288. return m_pCity ? m_pCity->getBuildingYieldChange((BuildingClassTypes)eBuildingClass, (YieldTypes)eYield) : 0;
  2289. }
  2290. void CyCity::setBuildingYieldChange(int /*BuildingClassTypes*/ eBuildingClass, int /*YieldTypes*/ eYield, int iChange)
  2291. {
  2292. if (m_pCity)
  2293. {
  2294. m_pCity->setBuildingYieldChange((BuildingClassTypes)eBuildingClass, (YieldTypes)eYield, iChange);
  2295. }
  2296. }
  2297. int CyCity::getBuildingCommerceChange(int /*BuildingClassTypes*/ eBuildingClass, int /*CommerceTypes*/ eCommerce) const
  2298. {
  2299. return m_pCity ? m_pCity->getBuildingCommerceChange((BuildingClassTypes)eBuildingClass, (CommerceTypes)eCommerce) : 0;
  2300. }
  2301. void CyCity::setBuildingCommerceChange(int /*BuildingClassTypes*/ eBuildingClass, int /*CommerceTypes*/ eCommerce, int iChange)
  2302. {
  2303. if (m_pCity)
  2304. {
  2305. m_pCity->setBuildingCommerceChange((BuildingClassTypes)eBuildingClass, (CommerceTypes)eCommerce, iChange);
  2306. }
  2307. }
  2308. int CyCity::getBuildingHappyChange(int /*BuildingClassTypes*/ eBuildingClass) const
  2309. {
  2310. return m_pCity ? m_pCity->getBuildingHappyChange((BuildingClassTypes)eBuildingClass) : 0;
  2311. }
  2312. void CyCity::setBuildingHappyChange(int /*BuildingClassTypes*/ eBuildingClass, int iChange)
  2313. {
  2314. if (m_pCity)
  2315. {
  2316. m_pCity->setBuildingHappyChange((BuildingClassTypes)eBuildingClass, iChange);
  2317. }
  2318. }
  2319. int CyCity::getBuildingHealthChange(int /*BuildingClassTypes*/ eBuildingClass) const
  2320. {
  2321. return m_pCity ? m_pCity->getBuildingHealthChange((BuildingClassTypes)eBuildingClass) : 0;
  2322. }
  2323. void CyCity::setBuildingHealthChange(int /*BuildingClassTypes*/ eBuildingClass, int iChange)
  2324. {
  2325. if (m_pCity)
  2326. {
  2327. m_pCity->setBuildingHealthChange((BuildingClassTypes)eBuildingClass, iChange);
  2328. }
  2329. }
  2330. int CyCity::getLiberationPlayer(bool bConquest)
  2331. {
  2332. return (m_pCity ? m_pCity->getLiberationPlayer(bConquest) : -1);
  2333. }
  2334. void CyCity::liberate(bool bConquest)
  2335. {
  2336. if (m_pCity)
  2337. {
  2338. m_pCity->liberate(bConquest);
  2339. }
  2340. }
  2341. //FfH: Added by Kael 10/18/2007
  2342. void CyCity::applyBuildEffects(CyUnit* pUnit)
  2343. {
  2344. if (m_pCity)
  2345. //>>>>Unofficial Bug Fix: Modified by Denev 2010/02/20
  2346. //*** Doubled unit by Warrens receives all effects from buildings.
  2347. // m_pCity->addProductionExperience(pUnit->getUnit());
  2348. {
  2349. m_pCity->applyBuildEffects(pUnit->getUnit());
  2350. }
  2351. //<<<<Unofficial Bug Fix: End Modify
  2352. }
  2353. void CyCity::changeCrime(int iChange)
  2354. {
  2355. if (m_pCity)
  2356. m_pCity->changeCrime(iChange);
  2357. }
  2358. int CyCity::getCrime() const
  2359. {
  2360. return m_pCity ? m_pCity->getCrime() : -1;
  2361. }
  2362. bool CyCity::isHasBuildingClass(int /*BuildingClassTypes*/ iIndex) const
  2363. {
  2364. return m_pCity ? m_pCity->isHasBuildingClass(iIndex) : false;
  2365. }
  2366. bool CyCity::isSettlement() const
  2367. {
  2368. return m_pCity ? m_pCity->isSettlement() : false;
  2369. }
  2370. void CyCity::setCivilizationType(int iNewValue)
  2371. {
  2372. if (m_pCity)
  2373. m_pCity->setCivilizationType(iNewValue);
  2374. }
  2375. // lfgr 03/2021
  2376. int CyCity::getPlotRadius() const
  2377. {
  2378. return m_pCity ? m_pCity->getPlotRadius() : 0;
  2379. }
  2380. void CyCity::setPlotRadius(int iNewValue)
  2381. {
  2382. if (m_pCity)
  2383. m_pCity->setPlotRadius(iNewValue);
  2384. }
  2385. // lfgr 03/2021
  2386. int CyCity::getNumCityPlots() const
  2387. {
  2388. return m_pCity ? ::calculateNumCityPlots( getPlotRadius() ) : 0;
  2389. }
  2390. void CyCity::setSettlement(bool bNewValue)
  2391. {
  2392. if (m_pCity)
  2393. m_pCity->setSettlement(bNewValue);
  2394. }
  2395. //FfH: End Add
  2396. /********************************************************************************/
  2397. /* Expose FfH Functions 02/28/12 lfgr */
  2398. /********************************************************************************/
  2399. bool CyCity::isUnhappyProduction() const
  2400. {
  2401. return m_pCity ? m_pCity->isUnhappyProduction() : false;
  2402. }
  2403. /********************************************************************************/
  2404. /* Expose FfH Functions End lfgr */
  2405. /********************************************************************************/
  2406. /*************************************************************************************************/
  2407. /** BETTER AI (New Functions Definition) Sephi **/
  2408. /** **/
  2409. /** **/
  2410. /*************************************************************************************************/
  2411. bool CyCity::AI_stopGrowth()
  2412. {
  2413. return m_pCity ? m_pCity->AI_stopGrowth() : false;
  2414. }
  2415. int CyCity::AI_neededSeaWorkers()
  2416. {
  2417. return m_pCity ? m_pCity->AI_neededSeaWorkers() : -1;
  2418. }
  2419. /*************************************************************************************************/
  2420. /** END **/
  2421. /*************************************************************************************************/
  2422. int CyCity::getAltarLevel()
  2423. {
  2424. return m_pCity ? m_pCity->getAltarLevel() : -1;
  2425. }
  2426. //>>>>Unofficial Bug Fix: Added by Denev 2009/09/28
  2427. //*** Assimilated city produces a unit with original civilization artstyle.
  2428. const TCHAR* CyCity::getUnitArtStyleButton(int /*UnitTypes*/ eUnit) const
  2429. {
  2430. return m_pCity ? m_pCity->getUnitArtStyleButton((UnitTypes)eUnit) : TEXT("");
  2431. }
  2432. //<<<<Unofficial Bug Fix: End Add
  2433. /************************************************************************************************/
  2434. /* REVOLUTION_MOD 02/01/09 jdog5000 */
  2435. /* */
  2436. /* */
  2437. /************************************************************************************************/
  2438. int /*UnitTypes*/ CyCity::AI_bestUnit()
  2439. {
  2440. return (m_pCity ? m_pCity->AI_bestUnit() : -1);
  2441. }
  2442. int /*UnitTypes*/ CyCity::AI_bestUnitAI(int iUnitAIType)
  2443. {
  2444. return (m_pCity ? m_pCity->AI_bestUnitAI((UnitAITypes)iUnitAIType) : -1);
  2445. }
  2446. int /*BuildingTypes*/ CyCity::AI_bestBuilding(int iFocusFlags)
  2447. {
  2448. return (m_pCity ? m_pCity->AI_bestBuilding(iFocusFlags) : -1);
  2449. }
  2450. /************************************************************************************************/
  2451. /* REVOLUTION_MOD END */
  2452. /************************************************************************************************/