From: Erik V. <eri...@xs...> - 2011-06-16 10:56:51
|
Ah, I knew these two issues were connected... > -----Oorspronkelijk bericht----- > Van: Stefan Frey [mailto:ste...@we...] > Verzonden: donderdag 16 juni 2011 6:56 > Aan: Development list for Rails: an 18xx game > Onderwerp: Re: [Rails-devel] 1830 Reading > > I had the impression, that you already created a bypass to allow manual > adjustments of Tiles.xml in the case it is required. > I am fine with TileSet.xml (or Map.xml) if this is what you think is best, as you > are responsible of the that area of program. > -----Oorspronkelijk bericht----- > Van: Stefan Frey [mailto:ste...@we...] > Verzonden: donderdag 16 juni 2011 7:14 > Aan: rai...@li... > Onderwerp: Re: [Rails-users] 1830 Reading & Coalfields Variant > > The Goderich tile (-939) is not the correct one in 1830 Tiles.xml: The station > definition is omitted. The one in 1856 Tiles.xml is correct. > However this is up to Erik to investigate, as Tiles.xml should be created > automatically with the correct entries. I had completely forgotten about this case. For lack of a better idea at that time, I must have changed the 1856 and 18EU Tiles.xml files manually, after its generation. So much for my principles... For a short-term solution, I will now also apply that fix to 1830. For the long term, we need a better solution. One option is to use tile -903 to define stations and tracks, and use tile -939 for display only. This is a trick that I already have used in a few other cases. The catch for you is, that you normally don't allow run-through via tile -903. To make that happen, I think we could use our new approach to add a tag <Station runThrough="yes"/>. However, as these games already use -903 for off-map areas that cannot be run through, this new tag should be put into Map.xml. Another option would be to create a new tile -1939 that is identical to -903 but can be modified in TileSet.xml. > I suggest that the code to determine the question if a station is tokened out > or accessible is part of the main Rail code base. Absolutely agreed. > Thus if there is a method for a Station object, which allows to query the > access rights, the question how this information is fed into this method, is > out of the control and interest of the revenue algorithm. > > (A similar separation will be done for the value property, where the revenue > algorithm still decides, whether to query the hex or the station for the > value.) What you really (should) want to use are the City objects, because that's where the (generic) Tile/Station and (specific) MapHex meet. (City is a bad name, and for a long time I have already wanted to change it to HexStation, but I didn't get to it yet). It should be possible to add all such methods to that class, but I'll have to work out the details first before I'm sure about it. If we manage to do that, we might be able to use both Map.xml and TileSet.xml to define station properties, as best fits the actual need. Erik. |