View Full Version : Not sure if I found a bug from CyInfoInterface2


NotSoGood
Jan 30, 2010, 01:56 AM
While editing my mod's dll, I stumbled into this when adding a iHealth tag for improvements...
python::class_<CvImprovementInfo, python::bases<CvInfoBase> >("CvImprovementInfo")

.def("getTilesPerGoody", &CvImprovementInfo::getTilesPerGoody, "int ()")
.def("getGoodyUniqueRange", &CvImprovementInfo::getGoodyUniqueRange, "int ()")
.def("getFeatureGrowthProbability", &CvImprovementInfo::getFeatureGrowthProbability, "int ()")
.def("getUpgradeTime", &CvImprovementInfo::getUpgradeTime, "int ()")
.def("getAirBombDefense", &CvImprovementInfo::getAirBombDefense, "int ()")
.def("getDefenseModifier", &CvImprovementInfo::getDefenseModifier, "int ()")
.def("getHappiness", &CvImprovementInfo::getDefenseModifier, "int ()")
.def("getPillageGold", &CvImprovementInfo::getPillageGold, "int ()")
.def("getImprovementPillage", &CvImprovementInfo::getImprovementPillage, "int ()")
.def("getImprovementUpgrade", &CvImprovementInfo::getImprovementUpgrade, "int ()")
...I was just wondering, because every else has like "getHealth" and &CvImprovementInfo::getHealth, but somehow "getHappiness" has getDefenseModifier. I'm not even sure what these things do. This was from UP 1.4, so I'm sure it isn't fixed yet. Can anyone confirm if this is a bug or not?

phungus420
Jan 30, 2010, 02:34 AM
That would definatly be a bug, yep. A typical cut and paste error, easy to do. The effect of which would be that when someone does a python call to see the Happiness from an improvement, the call will return the value of the defense modifier stored in the XML, instead of happiness.