From: brett l. <wak...@gm...> - 2010-01-20 16:27:49
|
On Wed, Jan 20, 2010 at 8:20 AM, Freek Dijkstra <sf_...@ma...> wrote: > Rick Westerman wrote: > >>> Other than requiring a lot of tedious XML editing, it's easy to >>> support, so I see no reason not to add it. > > Rick Westerman tutored: > >> The problem with tedious (and repetitive) XML is that it leads to >> tedious and much harder debugging. > [...] >> <Tile id="1" quantity="1" unlimited="-1"> >> >> Or better yet only exceptions to the rule if a given tile is not >> suppose to be unlimited. >> >> <Tile id="4" quantity="2" nounlimited> > > I propose to revert my suggested changes, and I come up with an > alternative patch that does exactly this in Java when I have some time. > That shouldn't be too hard (even with my limited Java skills). Are there > preferences: > > 1. add support the unlimited="-1" attribute as above > 2. add support the nounlimited attribute as above > 3. don't add an attribute. Unlimited is unlimited. Actually, there is an even better method, now that I'm thinking about how to solve the problem. Supporting unlimited tiles doesn't require changing the XML. It simply requires finding the places in the code where we check for tile availability, and adding an extra condition to it, so that it reads "if a tile is available or the unlimited tiles option is selected, lay a tile". > > Regards, > Freek Go ahead and send in 2 patches: One that reverts your changes, and one that implements a better solution. ---Brett. |