improvement that provides water

keldath

LivE LonG AnD PrOsPeR
Joined
Dec 20, 2005
Messages
7,580
Location
israel
hi there,

can anypne help the mod dune wars,

by creating a simple sdk code that adds a new tag to improvements ?

a tag that when set to say - 1 - 5 or somthing will define that that speciphic improvement will provide fresh water to tiles near it - the number on the tag - is how far the improvement supplies water.

the same principle as the oasis feature.

we have this code in python already,

but i would rather have it as an sdk code, it will be better for us,

thanks in advance.
keldath and friends.
 
I still think the easiest way to do this would be to clone the XML tag found in the featuresinfos file that provides water into improvementsinfos.
 
Once you copy the bAddsFreshWater tag to ImprovementInfo, you can make it take effect in CvPlot::isFreshWater() by adding this snipped near the end:

Code:
...

if (pLoopPlot != NULL)
{
	...

	[B]if (pLoopPlot->getImprovementType() != NO_IMPROVEMENT)
	{
		if (GC.getImprovementInfo(pLoopPlot->getImprovementType()).isAddsFreshWater())
		{
			return true;
		}
	}[/B]
}

...

Limiting the chaining range will be a bit more work.
 
Back
Top Bottom