Got a couple of improvements in my mod that "discovers" resources, but while its ok with mines, it becomes a bit silly when fur is discovered in the tropical and bananas in the polar regions, so I wanted to add a min/max longitude check.
So... void CvPlot::doImprovement()
if ((GET_TEAM(getTeam()).isHasTech((TechTypes)(GC.getBonusInfo((BonusTypes) iI).getTechReveal()))) && (canHaveBonus((BonusTypes)iI, false)))
Does this makes sense? I didnt get error or warning when compiling, but I doubt its correct.
Also, I'd really like if it was scaled on gamespeed.
if (GC.getGameINLINE().getSorenRandNum(GC.getImprovementInfo(getImprovementType()).getImprovementBonusDiscoverRand(iI) * iMaxTurns / 1000, "Bonus Discovery") == 0)
This is clearly wrong though. Any suggestions?
So... void CvPlot::doImprovement()
if ((GET_TEAM(getTeam()).isHasTech((TechTypes)(GC.getBonusInfo((BonusTypes) iI).getTechReveal()))) && (canHaveBonus((BonusTypes)iI, false)))
Does this makes sense? I didnt get error or warning when compiling, but I doubt its correct.
Also, I'd really like if it was scaled on gamespeed.
if (GC.getGameINLINE().getSorenRandNum(GC.getImprovementInfo(getImprovementType()).getImprovementBonusDiscoverRand(iI) * iMaxTurns / 1000, "Bonus Discovery") == 0)
This is clearly wrong though. Any suggestions?