On Thu, 2 May 2013 01:22:50 PM Joshua Lowe wrote: > We would like to submit the attached files as a solution to bug #2421
Thanks for working on this, however... > The specification.xml is the specification for classic FreeCol. I fear this file is out of date. Is it perhaps from 0.10.7? You need to be working from the trunk sources. A current solution would have <production.../> elements in the building type. The mod/specification.xml file also seems to use the old format. > It is noteworthy to mention that the only line changed in it is the second > line of building-type id="model.building.country" where > consumes="model.goods.grain" is changed to consumes="model.goods.food" That is very pleasing if that is all it takes. That should translate directly to production elements with minimal effort. However did you look at the remark on the BR: ``One missing point in the above analysis of Col 1 is that horse production is capped at half (round up) of your excess food.'' Are we handling that already, or is that going to need more work? Otherwise though, I think we are close to finally nailing this one. Hope to see an updated version soon. ------------- Meanwhile, it is still bugging me that anyone writing a mod has to include the entire type definition in the mod. A while back I added a hack to have the spec reader preserve an existing definition with a "preserve" attribute, so you could do things like: <building-type id="model.building.country" preserve="true" ...replacement- attributes... > ...replacement child elements... </building-type> Unfortunately this will not work for the current BuildingType mod. The first problem is a just a code omission (will fix soon), but more fundamentally the preservation semantics are inadequate for dealing with containers, such as used for ProductionTypes. The operation we want here is to replace the sole member of the production type container, but the only choice we have is to clear all the containers, or not, before adding a replacement ProductionType. If we clear the containers we get the right result for ProductionType but, we lose all the other containers contents (Abilities and Modifiers) and would have to respecify them in the mod, which is what I wanted to avoid. If we do not clear the containers, then we end up with two valid ProductionTypes present. Cheers, Mike Pope
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers