platyping
Sleeping Dragon
BUG does mess with the CvGameUtils disabling some of its functions somehow with its own ones.
for i in xrange(gc.getNumSpecialistInfos()):
ItemInfo = gc.getSpecialistInfo(i)
self.iList.append(ItemInfo.getDescription() + " Platy_" + str(i))
iGPClass = ItemInfo.getGreatPeopleUnitClass()
if iGPClass == -1: continue
iGP = gc.getCivilizationInfo(pCity.getCivilizationType()).getCivilizationUnits(iGPClass)
[B][COLOR="Red"]if not iGP in self.iList2:[/COLOR][/B]
GPInfo = gc.getUnitInfo(iGP)
self.iList2.append(GPInfo.getDescription() + " Platy_" + str(iGP))
self.iList = []
self.iList2 = [][COLOR="Cyan"]
self.iList3 = [][/COLOR]
for i in xrange(gc.getNumSpecialistInfos()):
ItemInfo = gc.getSpecialistInfo(i)
self.iList.append(ItemInfo.getDescription() + " Platy_" + str(i))
iGPClass = ItemInfo.getGreatPeopleUnitClass()
if iGPClass == -1: continue
iGP = gc.getCivilizationInfo(pCity.getCivilizationType()).getCivilizationUnits(iGPClass)
[COLOR="Cyan"] if iGP == -1: continue
if not iGP in self.iList3:
self.iList3.append(iGP)
for i in xrange(gc.getNumBuildingInfos()):
ItemInfo = gc.getBuildingInfo(i)
iGPClass = ItemInfo.getGreatPeopleUnitClass()
if iGPClass == -1: continue
iGP = gc.getCivilizationInfo(pCity.getCivilizationType()).getCivilizationUnits(iGPClass)
if iGP == -1: continue
if not iGP in self.iList3:
self.iList3.append(iGP)
for iGP in self.iList3:
GPInfo = gc.getUnitInfo(iGP)
self.iList2.append(GPInfo.getDescription() + " Platy_" + str(iGP))
[/COLOR]
self.iList = []
for i in xrange(gc.getNumTechInfos()):
ItemInfo = gc.getTechInfo(i)
iEra = ItemInfo.getEra()
[COLOR="Red"]if self.iEra == 1000 or self.iEra == iEra:[/COLOR]
self.iList.append(ItemInfo.getDescription() + " Platy_" + str(i))
self.iList.sort()
## if ePlayer in self.deactivated:
## return False
## else:
## if gc.getTeam(gc.getPlayer(ePlayer).getTeam()).isHasTech(gc.getInfoTypeForString("TECH_B5_INTERPLANETARY_MISSILES")) or gc.getPlayer(ePlayer).isBarbarian():
## self.deactivated.add(ePlayer)
## return False
## eUnitType = gc.getPlayer(ePlayer).getUnit(iUnit).getUnitType()
## eUnitCombat = self.unitCombatDict.get(eUnitType, None)
## if eUnitCombat == None:
## eUnitCombat = gc.getUnitInfo(eUnitType).getUnitCombatType()
## self.unitCombatDict[eUnitType] = eUnitCombat
## if eUnitCombat == gc.getInfoTypeForString("UNITCOMBAT_FRIGATE"):
## bRestricted = gc.getMap().plot(iX, iY).getOwner() != ePlayer
## elif eUnitCombat == gc.getInfoTypeForString("UNITCOMBAT_DESTROYER"):
## bRestricted = gc.getMap().plot(iX, iY).getOwner() != ePlayer
## elif eUnitCombat == gc.getInfoTypeForString("UNITCOMBAT_CRUISER"):
## bRestricted = gc.getMap().plot(iX, iY).getOwner() != ePlayer
## elif eUnitCombat == gc.getInfoTypeForString("UNITCOMBAT_TRANSPORT"):
## bRestricted = gc.getMap().plot(iX, iY).getOwner() != ePlayer
## elif eUnitCombat == gc.getInfoTypeForString("UNITCOMBAT_CARRIER_SHIP"):
## bRestricted = gc.getMap().plot(iX, iY).getOwner() != ePlayer
## else:
## bRestricted = False
## return bRestricted
if (!GC.getUnitClassInfo(getUnitClassType()).canLeaveBorders())
{
if (!GET_PLAYER(getOwnerINLINE()).isBarbarian())
{
bool bIsRestricted = true;
for (int i = 0; i < GC.getNumTechInfos(); i++)
{
if (GC.getTechInfo((TechTypes) i).isAllowsLeaveBorders() && GET_TEAM(GET_PLAYER(getOwnerINLINE()).getTeam()).isHasTech((TechTypes) i))
{
bIsRestricted = false;
break;
}
}
if (pPlot->getOwnerINLINE() != getOwnerINLINE() && bIsRestricted)
{
return false;
}
}
}