News:

SimuTranslator
Make Simutrans speak your language.

4-rotation town halls - odd placement

Started by The Hood, January 22, 2010, 10:34:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

The Hood

This is a split off the pak128.Britain discussion about rotations...

Quote from: Dwachs on January 22, 2010, 02:11:02 PM
You mean for rotated townhalls the newly created road were not in front of them? But always lower right of the building no matter how it was rotated?
This is what I mean.  Both were taken from the same new map.  Town halls always form in this position relative to a road, but with seemingly random rotation.  Ideally, the front should always face a road...

Dwachs

can you post  4-rotation pak for testing? or is there one in the pak128.Britain-package already?
Parsley, sage, rosemary, and maggikraut.

z9999+

If you have a plan to rewrite code to allow 2 or 4 rotations for cityhall, please consider none-square cityhall which is causing problem in pak96.comic, too.
http://forum.simutrans.com/index.php?topic=3700.0

The Hood

Current pak128.Britain package is 1 rotation only because of this issue.  Here are the sources of the 4R townhall.

http://files.[ simutrans [dot] us (site down, do not visit) ]/files/get/yWnilwxffg/4r-townhall.zip

Dwachs

Here is a patch. It also fixes some issues with the pak96.comic desert town hall. Ie Renovation does not leave any traces anymore.

Known issue: the intercity road generation needs to be adapted. It starts its roads independent of the town hall roads.
Parsley, sage, rosemary, and maggikraut.

Dwachs

Update: also intercity road connection respects townhall orientation. The patch now saves the position of one piece of road of the townhall in the savegame (if its version is stepped).
Parsley, sage, rosemary, and maggikraut.

The Hood

Looking forward to testing this if/when it makes it into trunk!

Dwachs

Parsley, sage, rosemary, and maggikraut.

The Hood


z9999+

Quote
Release Candidate 102.2.2
   ADD: support for townhalls with four rotations

Does this fully incorporated in 102.2.2 ?

Quote
   // save townhall road position
   if(file->get_version()>102002) {
      townhall_road.rdwr(file);
   }

???

Dwachs

Not fully, in the sense that this coordinate is not saved.

However, this coordinate is only used in connection with map enlargement, if a road from a new to an old city is built. If the position is not in the file, it is guessed, see simworld.cc, karte_t::distribute_groundobjs_cities, lines 900+.
Parsley, sage, rosemary, and maggikraut.