def canBuild(self,argsList):
iX, iY, iBuild, iPlayer = argsList
# scions start
pPlayer = gc.getPlayer(iPlayer)
iDesert = gc.getInfoTypeForString('TERRAIN_DESERT')
iBuildSCFarm = gc.getInfoTypeForString("BUILD_FARM")
pCity = argsList[0]
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SCIONS'):
pPlot = CyMap().plot(iX, iY)
if pPlot.getOwner() == iPlayer:
if pPlot.isCity() == False:
if pPlot.getTerrainType() == iDesert:
iBuildSCottage = gc.getInfoTypeForString("BUILD_COTTAGE")
if (iBuild == iBuildSCottage):
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FLOOD_PLAINS'):
return 0
else:
return 1