The excellent new tunnel slopes feature is a great addition to Simutrans, but one thing that it does highlight is one of the few remaining way tools without click and drag functionality: the tunnel. When building a tunnel entrance with the CTRL key, and laying tunnels underground manually, it would be much easier if one were able to do so by clicking and dragging, just as one is with ways above ground. I notice that one can add wayobjects to tunnels by clicking and dragging.
This is not possible easily, since underground tiles, on which is nothing, doesn't exist. And the preview for way building just add a dummy object with the right graphic to the tiles. But if there isn't a ground, it's a bit more complicated...
Edit:
With dummy-tiles it works. I will upload a patch soon.
Excellent, thank you :-)
Here it is. It also solves a bug: The tunnel portal wasn't set dirty in the correct way.
http://www-user.tu-chemnitz.de/~gerw/patches/tunnel_preview.patch (http://www-user.tu-chemnitz.de/~gerw/patches/tunnel_preview.patch)
(With the modifications to two_click_werkzeug it should be possible to define the signal tool in the autosignal patch as a two_click_tool).
Can someone move this topic to "patches", "considered" or "denied"? ;)
Excellent! This will make building underground networks much easier.
I remembered, that the preview of monorail was also buggy, I included a better preview for monorail.
http://www-user.tu-chemnitz.de/~gerw/patches/tunnel_preview_v2.patch (http://www-user.tu-chemnitz.de/~gerw/patches/tunnel_preview_v2.patch)
I also found a rather curious bug: You can build very high monorail and can't delete the uppermost ground... I'm just wondering that z9999 hasn't found this bug ;D
http://www-user.tu-chemnitz.de/~gerw/patches/pics/cant_remove_monorail.png (http://www-user.tu-chemnitz.de/~gerw/patches/pics/cant_remove_monorail.png)
For me, it's also a bit strange, that you can build a monorail upon an other. My suggestion is, that if you click on a monorail ground, the monorail will start at this ground. Before the "3d cursor" you couldn't select the monorail ground and therefore only 1 monorail layer was allowed.
One thing.
Estimated price on tooltips is not tunnel cost but normal way cost.
Thank you. This was buggy, because wegbauer_t::calc_cost didn't considered tunnel / monorail correctly.
tu-chemnitz.de/~gerw/patches/tunnel_preview_v3.patch (http://tu-chemnitz.de/~gerw/patches/tunnel_preview_v3.patch)
I cant reproduce the monorail bug you mentioned ???
One of monorail bug is preview image when dragging.
Preview image is not drawn monorail level but is always drawn on ground level.
This problem will solve by this patch.
This also happens with elevated roads, in case then patch doesn't address them. :)
@gerw: could you please update the patch? there are some conflicts.
I think the saving routines need some additional logic to not save the dummy grounds.
If I find some time, I will do it.
I ****umed, saving isn't possible while dragging, but thats maybe not true.. I've currently haven't an idea, how to solve this in an elegant way.
There's always autosave... ;-)
I've updated the patch tu-chemnitz.de/~gerw/patches/tunnel_preview_v4.patch (http://tu-chemnitz.de/~gerw/patches/tunnel_preview_v4.patch).
[advertisement]It was really easy with git.[/advertisement] :)
Has anybody a (good) idea, how to avoid saving of these dummy-grounds?
Remark: Maybe you will get a failed ****ertion, but this is caused by this bug: http://forum.simutrans.com/index.php?topic=2804 (http://forum.simutrans.com/index.php?topic=2804)
Yes, Git! Git makes things easy. Do you have a Github repository that I could watch?
The need for a saving routine is due to the behavior that if a dialogue tool is called then the current tool remains active. Which should be not the case.
I.e. in karte_t::set_werkzeug( werkzeug_t *w ) the first 'if' fails for dialogue tools. This should be catched to reset the active tool
@git: TortoiseSvn does not understand the diff-files produced by git. And there is no revision number in the file, which makes it hard to apply the patch for us poor windows using programmers.
I've only a local repository.
But this wouldn't solve the problem with auto-saves. One possibility is to reset the active tool in welt->speichern...
Can't Tortoise apply diff-files to the current directory? That would be odd...
At least for me it does nothing with such a file. No patching, no error message, nothing. I think it does not recognize the paths a/* and b/* right.
The above patch file doesn't contain a/* and b/* (you can create this with 'git diff ... --no-prefix'). Does this also not work?
git patches are not very friendly to patches on windows. Some work other not. That is why many games enforce to use the patch format of the distribution to submit patches. (But Tortoise is especially picky, without a revision usually it won't patch).
Prissi,
the idea with Git is to use branches instead of patches.
But then the difficulties arise if you take the git patch and want to apply it to the svn working copy.
Then the difficulties arise because of the use of SVN, not Git ;-)
We use subversion. Patches should be by svn diff style. We can do with other, but one should consider people not skilled with command line tools.
Of course one can discuss changing the rcs again. But I do not see the need at the moment to skip the working svn for another system. Honestly, I have already so much with non-programming issues to do in the last half a year or so, that I am quite reluctant against changing anything that works well enough.
Until now, I haven't noticed, that the git-diff-output will create problems. How do you apply (my) git diffs, if tortoise won't work? Maybe I could 'pipe' my patches through svn, if this is more convenient for you.
I edited the diff's to match the svn-diffs by hand :/
So I have to change the header
diff --git bauer/wegbauer.cc bauer/wegbauer.cc
index 8b2e4e0..a2ba1e5 100644
--- bauer/wegbauer.cc
+++ bauer/wegbauer.cc
into something like
Index: bauer/wegbauer.cc
===================================================================
--- bauer/wegbauer.cc (revision 2589)
+++ bauer/wegbauer.cc (working copy)
Am I right? Or are more/less changes needed?
patch can do this on the commandline also with git diffs, just use -p1 to ignore the first folder and directly apply it in trunk. However, I am not sure how to do this with TortoiseSVN.
You can use 'git diff --no-prefix' and git won't create the 'a/*' and 'b/*' part. But the missing version will still confuse tortoise?
New version of the patch. Now, the preview tiles are deleted, when the map is saved, see karte_t::speichern.
Can you apply the patch with tortoise? I wrote a little script, which converts the git-diff format to the svn one.
www.tu-chemnitz.de/~gerw/patches/tunnel_preview_v5.patch (http://www.tu-chemnitz.de/~gerw/patches/tunnel_preview_v5.patch)
Sorry- I'm stupid.
How do you apply this patch?
This depends on your system. With tortoise you will find a merge tool in the menu and with linux 'patch -p0 < path_to_patch_file'.
Edit: I had a small mistake in my script (I've forgot no-prefix). Please re-load the patch.
yes it worked.
Incorporated in rev 2620. Thank you!
Ok, I will post my script to convert git-diffs to diffs, which the simutrans commiters can apply :)
Was yesterday the 'happy commiting day'? :D