On Tue, 31 Jan 2017 21:38:43 +0100
"Enrico Weigelt, metux IT consult" <enrico.weig...@gr13.net> wrote:
> just stubled across some lines in TilePanel constructor, that look
> a bit strange to me:
> 
> 150> final UnitType expert = spec.getExpertForProducing(gt);
> 151> if (expert != null) {
> 152>     expertPotential = (int)expert.applyModifiers(amount,
> 153>         getGame().getTurn(), gt.getId());
> 154> }  
> 
> This applies a modifiers which have exactly the same as the goods type.
> It that really a good idea ? Wouldn't it be better to use scopes here ?

Did you mean the same identifier?  If so, it is not a problem.
Identifiers only need to be unique in FreeColGameObjects.  Modifiers are
not in that part of the object tree.

> OTOH, this is just in the gui - shouldn't there be a counterpart in
> the production calculation (ProductionCache ?) ?

I believe it happens through ColonyTile.getProductionModifiers.

Cheers,
Mike Pope

Attachment: pgpMXnQbiMcMG.pgp
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to