From: Stefan F. <ste...@we...> - 2013-10-31 12:20:06
|
Martin: this issue is not surprising: It relates to the fact that the attributes of stop are set static at creation time in Rails 1.x. This is changed in Rails 2.0 already (see below). To remind anyone: Station is an object that refers to the station on the tile. As there is only one object per tile type (even if the game includes several copies of the tile), it cannot be used to store tokens. Stop is an object that refers to the station on the mapHex. This allows storing of the tokens. Stops usually (NOT always) survive a tile lay. The attributes of a stop are assigned at the creation of the stop. What you can do is change the attributes from setRelatedStation at the time of tile lay. However to make this undo-proof all attributes have to be state variables, unless the stop is not set to the previous attributes after a call to undo. In Rails2.0 (compare branch route) this is changed already: Stops only store tokens and a reference to the station (dynamic) and mapHex (static, parent of stop), no other variables that can change. The attributes are always determined at run-time, so there is no need for state variables. Thus there will be no issue there. In 1856 downgrades should work in general, as it implies removing the stop. Upgrades could in principle be an issue, however there are only standard trains in 1856, so the difference between towns and cities is not relevant for revenue calculation. Stefan PS: Could we please keep discussing development issues on the development list? This makes it easier to search for relevant discussions later. Thanks! On 10/29/2013 10:34 PM, Martin Brumm wrote: > Hi Stefan, Michael, Erik, > > upon the placement of a tile with a town onto the new tiles (in 1880) > "Medium" Cities rails so far didnt change the initial type (as we didnt > introduce this special type in the codebase). So its an 1880 problem. > > The quick fix was to alter setRelatedStation in Stop.java to change the > Type and ScoreType to a town also. > > The more complex way might be to alter MapHex and Stop to incorporate > the medium city type. But since that "downgrade" to town is the only > option beside from that station staying as a city tile.... > > But as usual the fix is only in the 1880 release branch yet, we might > however fix that in a different way in 2.0 ? > > On another thought, isnt there another game where you can alter a town > hex to a non town tile ? > > Kind Regards, > Martin > > > |