home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / Civilization4 / data1.cab / Civ4DemoComponent / Assets / Python / EntryPoints / CvGameInterface.py < prev    next >
Encoding:
Python Source  |  2005-11-09  |  7.2 KB  |  220 lines

  1. ## Sid Meier's Civilization 4
  2. ## Copyright Firaxis Games 2005
  3. ##
  4. ## #####   WARNING - MODIFYING THE FUNCTION NAMES OF THIS FILE IS PROHIBITED  #####
  5. ## 
  6. ## The app specifically calls the functions as they are named. Use this file to pass 
  7. ## args to another file that contains your modifications
  8.  
  9. #
  10. import CvUtil
  11. import CvGameUtils
  12. import CvEventInterface
  13. from CvPythonExtensions import *
  14.  
  15. # globals
  16. gc = CyGlobalContext()
  17. normalGameUtils = CvGameUtils.CvGameUtils()
  18.  
  19. def gameUtils():
  20.     ' replace normalGameUtils with your mod version'
  21.     return normalGameUtils
  22.         
  23. def isVictoryTest():
  24.     #CvUtil.pyPrint( "CvGameInterface.isVictoryTest" )
  25.     return gameUtils().isVictoryTest()
  26.  
  27. def isPlayerResearch(argsList):
  28.     #CvUtil.pyPrint( "CvGameInterface.isPlayerResearch" )
  29.     return gameUtils().isPlayerResearch(argsList)
  30.  
  31. def createBarbarianCities():
  32.     #CvUtil.pyPrint( "CvGameInterface.createBarbarianCities" )
  33.     return gameUtils().createBarbarianCities()
  34.  
  35. def createBarbarianUnits():
  36.     #CvUtil.pyPrint( "CvGameInterface.createBarbarianUnits" )
  37.     return gameUtils().createBarbarianUnits()
  38.  
  39. def skipResearchPopup(argsList):
  40.     #CvUtil.pyPrint( "CvGameInterface.skipResearchPopup" )
  41.     return gameUtils().skipResearchPopup(argsList)
  42.  
  43. def showTechChooserButton(argsList):
  44.     #CvUtil.pyPrint( "CvGameInterface.showTechChooserButton" )
  45.     return gameUtils().showTechChooserButton(argsList)
  46.  
  47. def getFirstRecommendedTech(argsList):
  48.     #CvUtil.pyPrint( "CvGameInterface.getFirstRecommendedTech" )
  49.     return gameUtils().getFirstRecommendedTech(argsList)
  50.  
  51. def getSecondRecommendedTech(argsList):
  52.     #CvUtil.pyPrint( "CvGameInterface.getSecondRecommendedTech" )
  53.     return gameUtils().getSecondRecommendedTech(argsList)
  54.  
  55. def skipProductionPopup(argsList):
  56.     #CvUtil.pyPrint( "CvGameInterface.skipProductionPopup" )
  57.     return gameUtils().skipProductionPopup(argsList)
  58.  
  59. def showExamineCityButton(argsList):
  60.     #CvUtil.pyPrint( "CvGameInterface.showExamineCityButton" )
  61.     return gameUtils().showExamineCityButton(argsList)
  62.  
  63. def getRecommendedUnit(argsList):
  64.     #CvUtil.pyPrint( "CvGameInterface.getRecommendedUnit" )
  65.     return gameUtils().getRecommendedUnit(argsList)
  66.  
  67. def getRecommendedBuilding(argsList):
  68.     #CvUtil.pyPrint( "CvGameInterface.getRecommendedBuilding" )
  69.     return gameUtils().getRecommendedBuilding(argsList)
  70.  
  71. def updateColoredPlots():
  72.     #CvUtil.pyPrint( "CvGameInterface.updateColoredPlots" )
  73.     return gameUtils().updateColoredPlots()
  74.  
  75. def isActionRecommended(argsList):
  76.     #CvUtil.pyPrint( "CvGameInterface.isActionRecommended" )
  77.     return gameUtils().isActionRecommended(argsList)
  78.  
  79. def cannotHandleAction(argsList):
  80.     #CvUtil.pyPrint( "CvGameInterface.cannotHandleAction" )
  81.     return gameUtils().cannotHandleAction(argsList)
  82.  
  83. def cannotSelectionListMove(argsList):
  84.     #CvUtil.pyPrint( "CvGameInterface.cannotSelectionListMove" )
  85.     return gameUtils().cannotSelectionListMove(argsList)
  86.  
  87. def cannotSelectionListGameNetMessage(argsList):
  88.     #CvUtil.pyPrint( "CvGameInterface.cannotSelectionListGameNetMessage" )
  89.     return gameUtils().cannotSelectionListGameNetMessage(argsList)
  90.  
  91. def cannotDoControl(argsList):
  92.     #CvUtil.pyPrint( "CvGameInterface.cannotDoControl" )
  93.     return gameUtils().cannotDoControl(argsList)
  94.  
  95. def canResearch(argsList):
  96.     #CvUtil.pyPrint( "CvGameInterface.canResearch" )
  97.     return gameUtils().canResearch(argsList)
  98.  
  99. def cannotResearch(argsList):
  100.     #CvUtil.pyPrint( "CvGameInterface.cannotResearch" )
  101.     return gameUtils().cannotResearch(argsList)
  102.  
  103. def canDoCivic(argsList):
  104.     #CvUtil.pyPrint( "CvGameInterface.canDoCivic" )
  105.     return gameUtils().canDoCivic(argsList)
  106.  
  107. def cannotDoCivic(argsList):
  108.     #CvUtil.pyPrint( "CvGameInterface.cannotDoCivic" )
  109.     return gameUtils().cannotDoCivic(argsList)
  110.  
  111. def canTrain(argsList):
  112.     #CvUtil.pyPrint( "CvGameInterface.canTrain" )
  113.     return gameUtils().canTrain(argsList)
  114.  
  115. def cannotTrain(argsList):
  116.     #CvUtil.pyPrint( "CvGameInterface.cannotTrain" )
  117.     return gameUtils().cannotTrain(argsList)
  118.  
  119. def canConstruct(argsList):
  120.     #CvUtil.pyPrint( "CvGameInterface.canConstruct" )
  121.     return gameUtils().canConstruct(argsList)
  122.  
  123. def cannotConstruct(argsList):
  124.     #CvUtil.pyPrint( "CvGameInterface.cannotConstruct" )
  125.     return gameUtils().cannotConstruct(argsList)
  126.  
  127. def canCreate(argsList):
  128.     #CvUtil.pyPrint( "CvGameInterface.canCreate" )
  129.     return gameUtils().canCreate(argsList)
  130.  
  131. def cannotCreate(argsList):
  132.     #CvUtil.pyPrint( "CvGameInterface.cannotCreate" )
  133.     return gameUtils().cannotCreate(argsList)
  134.  
  135. def canMaintain(argsList):
  136.     #CvUtil.pyPrint( "CvGameInterface.canMaintain" )
  137.     return gameUtils().canMaintain(argsList)
  138.  
  139. def cannotMaintain(argsList):
  140.     #CvUtil.pyPrint( "CvGameInterface.cannotMaintain" )
  141.     return gameUtils().cannotMaintain(argsList)
  142.  
  143. def AI_chooseTech(argsList):
  144.     'AI chooses what to research'
  145.     #CvUtil.pyPrint( "CvGameInterface.AI_chooseTech" )
  146.     return gameUtils().AI_chooseTech(argsList)
  147.  
  148. def AI_chooseProduction(argsList):
  149.     'AI chooses city production'
  150.     #CvUtil.pyPrint( "CvGameInterface.AI_chooseProduction" )
  151.     return gameUtils().AI_chooseProduction(argsList)
  152.  
  153. def AI_unitUpdate(argsList):
  154.     'AI moves units - return 0 to let AI handle it, return 1 to say that the move is handled in python '
  155.     #CvUtil.pyPrint( "CvGameInterface.AI_unitUpdate" )
  156.     return gameUtils().AI_unitUpdate(argsList)
  157.  
  158. def AI_doWar(argsList):
  159.     'AI decides whether to make war or peace - return 0 to let AI handle it, return 1 to say that the move is handled in python '
  160.     #CvUtil.pyPrint( "CvGameInterface.AI_doWar" )
  161.     return gameUtils().AI_doWar(argsList)
  162.  
  163. def AI_doDiplo(argsList):
  164.     'AI decides does diplomacy for the turn - return 0 to let AI handle it, return 1 to say that the move is handled in python '
  165.     #CvUtil.pyPrint( "CvGameInterface.AI_doDiplo" )
  166.     return gameUtils().AI_doDiplo(argsList)
  167.  
  168. def calculateScore(argsList):
  169.     #CvUtil.pyPrint( "CvGameInterface.calculateScore" )
  170.     return gameUtils().calculateScore(argsList)
  171.  
  172. def doHolyCity():
  173.     #CvUtil.pyPrint( "CvGameInterface.doHolyCity" )
  174.     return gameUtils().doHolyCity()
  175.  
  176. def doHolyCityTech(argsList):
  177.     #CvUtil.pyPrint( "CvGameInterface.doHolyCityTech" )
  178.     return gameUtils().doHolyCityTech(argsList)
  179.  
  180. def doGold(argsList):
  181.     #CvUtil.pyPrint( "CvGameInterface.doGold" )
  182.     return gameUtils().doGold(argsList)
  183.  
  184. def doResearch(argsList):
  185.     #CvUtil.pyPrint( "CvGameInterface.doResearch" )
  186.     return gameUtils().doResearch(argsList)
  187.  
  188. def doGoody(argsList):
  189.     #CvUtil.pyPrint( "CvGameInterface.doGoody" )
  190.     return gameUtils().doGoody(argsList)
  191.  
  192. def doGrowth(argsList):
  193.     #CvUtil.pyPrint( "CvGameInterface.doGrowth" )
  194.     return gameUtils().doGrowth(argsList)
  195.  
  196. def doProduction(argsList):
  197.     #CvUtil.pyPrint( "CvGameInterface.doProduction" )
  198.     return gameUtils().doProduction(argsList)
  199.  
  200. def doCulture(argsList):
  201.     #CvUtil.pyPrint( "CvGameInterface.doCulture" )
  202.     return gameUtils().doCulture(argsList)
  203.  
  204. def doPlotCulture(argsList):
  205.     #CvUtil.pyPrint( "CvGameInterface.doPlotCulture" )
  206.     return gameUtils().doPlotCulture(argsList)
  207.  
  208. def doReligion(argsList):
  209.     #CvUtil.pyPrint( "CvGameInterface.doReligion" )
  210.     return gameUtils().doReligion(argsList)
  211.  
  212. def doGreatPeople(argsList):
  213.     #CvUtil.pyPrint( "CvGameInterface.doGreatPeople" )
  214.     return gameUtils().doGreatPeople(argsList)
  215.  
  216. def doMeltdown(argsList):
  217.     #CvUtil.pyPrint( "CvGameInterface.doMeltdown" )
  218.     return gameUtils().doMeltdown(argsList)
  219.  
  220.