On Thu, 3 Jan 2013 11:00:54 PM Michael T. Pope wrote: > On Thu, 3 Jan 2013 10:01:40 AM Michael T. Pope wrote: > > OK. Perhaps I should take my own suggestion upthread and see if the > > autoproduction functionality would work in these cases.
Or perhaps not. I have backed out of the autoproduction route, and have just committed a solution (svn.10437) that AFAICT does the Right Thing. That is, the Right Thing as defined as `produces goods like 0.10.6 does except includes national advantages'. I am still not sure 0.10.6 was entirely right, or that `Show Productivity' is coherent, but at least the actual production makes sense now. The core of the fix is just to add: <scope ability-id="model.ability.person" matchNegated="true"/> to any production related bonus that should only apply at the building level, such as Jefferson, Newspaper, or those annoying non-unit specific building bonuses that started this. In effect, the inverse of the previous round of fixes where we wanted the national advantage bonuses only to apply to persons. There may be a corner case somewhere that may require inventing a building ability and using a positive test, but I have not found one. With that in place, getProductionModifiers has stopped picking up building modifiers when called with a unitType argument, thus the problematic getUnitConsumption routine can be expressed in terms of getProductionModifiers, which means the actual production at last bears some resemblance to what we see in "Show Productivity". Old games with the old spec remain problematic. Lacking those scopes, the relevant bonuses are still picked up per unit, leading to exhilarating production levels (particularly of bells). What do you think? Should I write some *really* special purpose backward compatibility code to add them in on the fly? Cheers, Mike Pope
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812
_______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers