... either because it was paid for by energy/diplomacy, or completed by production after a few turns.
I was able to "intercept" when a unit is created. That's Events.SerialEventUnitCreated(playerId, unitId, ihexVec, iUnitType, iCultureType, civId, iPrimaryColor, iSecondaryColor, iUnitFlagIndex, iFogState). What is the Event or GameEvent for when a building or wonder has been completed (and its parameters)?
There's GameEvents.BuildFinished(...), but I believe that's for constructing roads, deforestation, and tile improvements.
There are also events that have the word "Can" in them, like PlayerCanConstruct and PlayerCanCreate, but the wording of those functions seem like they would be fired right before a user sees the list of what they can build in a city, and that I should return a boolean should I choose to handle these events.
I cannot figure this one out after looking at documentation, the .lua files in the game, lots of code in this forum, and from looking at a few people's sponsor mods' .lua files. So, I would really appreciate any lead on this.
I was able to "intercept" when a unit is created. That's Events.SerialEventUnitCreated(playerId, unitId, ihexVec, iUnitType, iCultureType, civId, iPrimaryColor, iSecondaryColor, iUnitFlagIndex, iFogState). What is the Event or GameEvent for when a building or wonder has been completed (and its parameters)?
There's GameEvents.BuildFinished(...), but I believe that's for constructing roads, deforestation, and tile improvements.
There are also events that have the word "Can" in them, like PlayerCanConstruct and PlayerCanCreate, but the wording of those functions seem like they would be fired right before a user sees the list of what they can build in a city, and that I should return a boolean should I choose to handle these events.
I cannot figure this one out after looking at documentation, the .lua files in the game, lots of code in this forum, and from looking at a few people's sponsor mods' .lua files. So, I would really appreciate any lead on this.