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.
I have made some progress, but am a bit stuck because I do not know what is right. I have some improvements to Building.getAdjustedProductionInfo that allow the non-unit production bonuses to work as a type of autoproduction if you add an appropriate ability to the building-type in the spec. So far so good. What remains broken are the building and furTrapping national advantages. The core of the problem is that Building.getUnitConsumption does not see these advantages, yet otherwise produces the correct results. OK, so I could add them in. We still then have the problem that getUnitConsumption does a hard coded special case calculation --- it really should be using Building.getProductionModifiers(goodsType, unitType) which is what is used by the "Show Productivity" menu item. However, that in turn is broken in that while it does show the national advantages, it also shows other modifiers like the Jefferson bonus which are only actually applied at the building level. So I am back to this question of what is a per-unit modifier, and what is a building-specific modifier? So far, we have: basic-production : applies to each working unit expert : applies to any unit that is an expert colony-SoL : applies to each working unit colony-building-bonus(e.g newspaper) : applies to the work locations in the colony that produce the modified goods type player-level-bonus(e.g. Jefferson) : applies to any work location that produces the modified goods type auto-production: applies to the relevant work location and possibly more. Are these right? If so, what do we want Show Productivity to show? You get it by clicking a unit, should it just have the unit's contribution (as in getUnitConsumption) or should the building-level modifiers be listed as well, even though the final total is confusing as it ignores the contribution of other units. Or should we give this up as incoherent and just have a Show Productivity for the entire building including all its units and autoproduction? Enough confusion for today. Cheers, Mike Pope
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ 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. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712
_______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers