found() vs initCity()

Baldyr

"Hit It"
Joined
Dec 5, 2009
Messages
5,530
Location
Sweden
What is the difference between the CyPlayer methods found() and initCity()? They both take the same arguments and they also both return the new CyCity instance (well, not according to the API, but in practice).

Does this affect whether or not the onCityBuilt call is triggered? (So there would be a difference between "founding" and "spawning" a city.)

Does anyone know? :confused:
 
What is the difference between the CyPlayer methods found() and initCity()? They both take the same arguments and they also both return the new CyCity instance (well, not according to the API, but in practice).

Does this affect whether or not the onCityBuilt call is triggered? (So there would be a difference between "founding" and "spawning" a city.)

Does anyone know? :confused:

The CvPlayer::found function calls the CvPlayer::initCity. initCity adds only the city, it does nothing else. found function calls the initCity function and adds defending barbarian units if the city owner is barbarian. It also adds the start era's free buildings to the city and if I understand it right, it also calls the onCityBuilt from python.
 
Aha, so found() is sort of a wrapper thing then, adding some bells'n'whistles. This is very useful to know, in any case. :goodjob:

And have been wondering where those Barbarian units are coming from... :p

Is there perhaps a similar wrapper method for units?
 
.. and they also both return the new CyCity instance (well, not according to the API, but in practice).
Turns out I was wrong, found() only returns None. :rolleyes:
 
What do you mean with this? Function that creates the unit?
Well, a method that will call initUnit() but also adds something else (like call onUnitCreated, or something). Like found() does. But there probably isn't one anyway...
 
@Baldyr - sidenote: I checked out your signature and I have to say that Lena Meyer is BAD ASS. I WILL be voting for her May 29. Awesome, totally awesome (some of us barbarians actually appreciate good singing;)).
 
Jester Fool:
Spoiler :
@Baldyr - sidenote: I checked out your signature and I have to say that Lena Meyer is BAD ASS. I WILL be voting for her May 29. Awesome, totally awesome (some of us barbarians actually appreciate good singing;)).
Yeah! My propaganda is actually working, then. :D

I might add that Lena has been promoting her album all week on German television. The performances can be found here. :goodjob: (One performance is missing, though, and one is labeled wrong. But anyway.)
 
Back
Top Bottom