def applySovietNames():
for city in utils.getCityList(iRussia):
sOldName = city.getName()
sNewName = ""
if sOldName == 'Caricyn': sNewName = 'Stalingrad'
elif sOldName == 'Sankt-Peterburg': sNewName = 'Leningrad'
elif sOldName == "Tver'": sNewName = 'Kalinin'
elif sOldName == 'Ekaterinburg': sNewName = 'Sverdlovsk'
elif sOldName == 'Nizhnij Novgorod': sNewName = 'Gorki'
elif sOldName == 'Samara': sNewName = 'Kujbyshev'
elif sOldName == "Car'grad": sNewName = "Konstantinopol'"
elif sOldName == 'Bobrujsk': sNewName = 'Stalink'
elif sOldName == 'Vjatka': sNewName = 'Kirov'
elif sOldName == 'Bavly': sNewName = "Oktjabr'skij"
elif sOldName == 'Sumin': sNewName = 'Sumy'
elif sOldName == 'Sjangan': sNewName = 'Gon Kong'
[COLOR="Red"][B] for city in utils.getCityList(iMongolia):
sOldName = city.getName()
sNewName = ""
if sOldName == "Bayan Tu'men": sNewName = 'Choibalsan'[/COLOR]
[/B]
if sNewName != "":
city.setName(sNewName, False)
Sorry, I meant it applies when they adopt Central Planning.Wait, so you mean the current method applies whenever Russia discover Communism tech regardless being a Communist or not? I thought that method will apply when Russia reaches Industrial Era and apply civic con.CentralPlanning....
for city in utils.getCityList(i[B][COLOR="Red"]Civ[/COLOR][/B]):
sOldName = city.getName()
sNewName = ""
Easter eggsare meant to be discovered, not spoiled.
Assuming that the iCiv variable is passed along as a method parameter, yes.I changed my mind a bit, instead of defining what city list for Russia and what city list for Mongolia, I would like a method that rename whenever the city owner is communist, regardless being Russia, Mongolia, China, Korea or even USA.
Is the following correct?
Code:for city in utils.getCityList(i[B][COLOR="Red"]Civ[/COLOR][/B]): sOldName = city.getName() sNewName = ""
elif iEra == con.iIndustrial:
[B][COLOR="Red"]if iCiv in [iRussia, iMongolia][/COLOR][/B]:
if pCiv.getCivics(3) == con.iCivicCentralPlanning: applySovietNames()
elif iEra == con.iIndustrial:
if iCiv in [iRussia, iMongolia]:
if pCiv.getCivics(3) == con.iCivicCentralPlanning: applySovietNames([COLOR="Red"]iCiv[/COLOR])
def applySovietNames([COLOR="Red"]iCiv[/COLOR]):
...
#Jerusalem
lJerusalem = [Yerushalayim, Al-Quds, Jerusalem, Hierousalem, Kudus, Qods]
for city.getCoordinate() == [73,38] and names in lJerusalem:
if city.getLanguages() = iLangGreece: city.setName("Hierousalem", False)
elif city.getLanguages() = iLangArabia: city.setName = ("Al-Quds", False)
elif city.getLanguages() = iLangTurkey: city.setName = ("Kudus", False)
etc
You've said that adding another civ is much easier now. Can you post a tutorial for those who want to try?