On 04.01.2013 03:40, Michael T. Pope wrote: > 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. >
It's not, really. I think it should show the production due to the unit itself, and that due to the building, but the two should be more clearly distinguishable. > 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. > This solution is so obvious that I failed to see it. Congrats! > 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 > I really don't think it is worth the trouble, but there is nothing to stop you. Regards Michael ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 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_122912 _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers