resource from a feature

Could you tell me above all the top codes which is the best to pick?
I think the best result would come from adding this last in CvPlot::setFeatureBonus()
Code:
// cache variables
static FeatureTypes eFeature = (FeatureTypes)GC.getInfoTypeForString("FEATURE_DUMMY");
static BonusTypes eBonus = (BonusTypes)GC.getInfoTypeForString("BONUS_DUMMY");

if (getFeatureType() == eFeature [S]&& getBonusType() == NO_BONUS[/S]) 
{ 
    setBonus(eBonus); 
} 
else if (getFeatureType() != eFeature && getBonusType() == eBonus) 
{ 
    setBonusType(NO_BONUS); 
}
I modified it compared to last to overwrite existing bonuses. I'm not sure if that is wise, but at least it will avoid the issue about unrevealed bonuses. Maybe you need to do something regarding setting up the map at start, but with a bit of luck, it will work without it. It depends on the map generator and how it modifies the map.

Come to think of it, it is possible that the map generator fills in the features and then add bonuses to plots with no existing bonuses. If that is the case, then by the time it adds bonuses, the feature bonuses are already added and the plots will not be considered when adding the other bonuses. Again it depends on the map generator code, but it's possible that the problem is fixed before it shows up. Testing is certainly needed.
 
cool Nightinggale,

the crossing like is to be deleted yes? that part refers to overwrite resources like you said?

i most certainly test on the weekend.

the python code is not recommended i see.


again i thank everyone who participated in this thread, your are all so kind.

thank all.
 
Back
Top Bottom