OrionVeteran
Deity
I'm slaving over the development of more python functions again. This time I am in need of determining if a great specialist has been assigned to a city as a Super specialist. For example: I have a city plot that has two great specialists (GS), one GS that has joined the city (as a Super Specialist) and one GS that has not joined the city. I want to determine/isolate which GS has joined the city. I have written a nifty function to determine if a unit type is a GS, but it falls short of excluding specialists that have joined a city. I appreciate any ideas that could help.
Code:
def isGreatSpecialist(iUnitType):
# Orion's Standard Functions
# Returns True if the unit is a Great Specialist
# Returns False if the unit is not a Great Specialist
bIsGreatSpecialist = False
for iSpecialist in range(gc.getNumSpecialistInfos()):
if iSpecialist != SpecialistTypes.NO_SPECIALIST:
if (gc.getUnitInfo(iUnitType).getGreatPeoples(iSpecialist)):
bIsGreatSpecialist = True
break
return bIsGreatSpecialist