FreeBuilding

Moriboe

King
Joined
Nov 30, 2010
Messages
662
Location
Belgium
There's a mistake in InfoTooltipInclude.lua in AutoTips: the FreeBuilding column in the Buildings table refers to a building class, but the code refers to a building.

Code:
{"FreeBuilding"						, pBuildingInfo.FreeBuilding and Locale.ConvertTextKey(GameInfo.Building[COLOR="Red"]Classe[/COLOR]s[pBuildingInfo.FreeBuilding].Description) or false },

I have the line <FreeBuilding>BUILDINGCLASS_MEDICAL_LAB</FreeBuilding> in one of my wonders, which made the tech tree go

attachment.php


and made me go :wallbash:

... all because I didn't want to give up compatibility with CiVUP of course :goodjob:
 

Attachments

  • techtreeborked.jpg
    techtreeborked.jpg
    27.2 KB · Views: 444
Thanks for pointing this out! I've fixed it for v8.3.

This means FreeBuilding and FreeBuildingThisCity are even more confusing attributes than I though! :lol:

I'm guessing FreeBuilding places an actual copy of the building in the city? FreeBuildingThisCity does not. A city with a Great Library does not actually get a Library, which can be confirmed by looking at the city's building list in the tuner. The game does some more complicated work behind the scenes.

More appropriate names would probably be ExtraBuildingClass and FreeBuildingClass, clarifying this difference. I wish we could fix problems like this directly.
 
Back
Top Bottom