News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Patch to Shift-constriction mode

Started by Ichou, April 06, 2017, 08:07:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ichou

<This topic is derived from http://forum.simutrans.com/index.php?topic=16851.0>

I made a patch to complete Shift-construction mode.
This patch is based on r8188.

This patch has 2 additional functions.

  • Point lower layer when clicked by elevated waybuilders with Shift key on.
  • Consider existing elevated ways as "path"s when elevated ways are built.

Therefore, with this patch, you can receive much convenience as the movie shows.
[vimeo]https://vimeo.com/211881257[/vimeo]

This patch will definitely make your Simutrans more useful!

Leartin

Looking good, hope it has no side effects so it can be implemented :)

Ichou

I confirmed this works with r8163 - the latest stable version.

Dwachs

Imho the patch doubles some code in wegbauer.cc, which is not nice from a maintaining perspective. It should be possible to obtain the same behavior by modifying just the essential parts. Also you do not need a second instance of marker_t.
Parsley, sage, rosemary, and maggikraut.

Ichou

#4
QuoteImho the patch doubles some code in wegbauer.cc, which is not nice from a maintaining perspective. It should be possible to obtain the same behavior by modifying just the essential parts. Also you do not need a second instance of marker_t.
I wonder whether it is possible to make a grund_t obj which means there is no obj, and which contains only the coordinates as meaningful information.
If it's possible, I don't need the second instance of marker_t and reduce some double coding easily.
If it's not possible, I need it because it has to distinguish the two situations that the tile is visited as "lower" or "upper" layers.





I reduced part of doubled coding.(Not all!)

Changing general source to search ways, it might cause a problem related to groundway/bridge/tunnels/... construction.

prissi

Thank you incorporated in r8284, thank you

Dwachs

Now we have a lot of code duplicated and triplicated in wegbauer.cc
Parsley, sage, rosemary, and maggikraut.

prissi

Yes, but it reduced the otherwise even larger check for readiness for places. Not sure how one could get away without duplication in some place.