How many tiles does this need?

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

It's great to see you working out my idea, but it's far from original. I don't mind that, but this will costs you more and more of work! You also have to think of the fact that if you edit more code, more code can change with every update of the SVN source. And read my signature as well (the quote in it) ;)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Yeah, your signature is really funny :P
but it's far from original.
What do you mean?
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

More progress:

Tooltip is visible after pressing shift. I don't like shift, so if you have some proposals on key, please post. However, no ctrl - it is being used by diagonal selection patch.

It works with tunnels. However, it shows lenght of dock (2), too

Height difference for bridges works with no problems

The tooltip is no longer behind a mouse cursor. It is moved down. However, it can go behind the cursor at the very bottom of the screen

{} (new line sign) works in tooltip. Hacky way, but it works with no problems


TODO: Compatibility with railway construction (autorail and signals)

Attached file is still a r3165 diff because .dsp and .dsw files were not updated in the diff. Belugas' patch removed the errors, however, it created many errors with AI files
Attachments
tooltip4_r3165.patch
(9.71 KiB) Downloaded 106 times
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Sorry from triple posting but it is next case:

I've made autorail\signal placement in standard OTTD directions (NW, NE, SW, SE) but odd directions (N S W E) are true pain.

Dominik and Ludde wrote it, but real live caught them. Dominik was last logged in on IRC 37 weeks ago, Ludde 5 weeks ago. On the forum? Don't even try to count.

For anyone interested, now I'm working on CalcRaildirsDrawstyle in viewport.c. If you scroll down to

Code: Select all

} else { // complicated direction
it will be the N S W E direction code. At least I think "complicated direction" mean so...

By the way, here is a preview of working part of railway construction measurment
Attachments
measure_test_6.png
measure_test_6.png (32.55 KiB) Viewed 2148 times
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

Great!
I compiled r3165 from SVN with your latest patch, deleted this line in misc_gui.c:

if(_shift_pressed) {

and the corresponding:
}
So now I don't have to press Shift to see the tooltip. Much better!

And I've found some little bugs, which are quite difficult to explain but I will try with a lot of screenies :P

just wait for the edit ;)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

MeusH wrote:Tooltip is visible after pressing shift. I don't like shift, so if you have some proposals on key, please post.
OK...
webfreakz.nl wrote:I compiled r3165 from SVN with your latest patch, deleted this line in misc_gui.c:

if(_shift_pressed) {

and the corresponding:
}
So now I don't have to press Shift to see the tooltip. Much better!
How about simply having it as a patch? I know I'd like this to be always-on. This relieves the need for any more keypresses, leaving more keys available for the rest of the game.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

The no-shift patch, and behind that 2 pictures with minor tooltip-bugs :)

The red-arrow in tooltip#1.png shows an 7 which sometimes appears when pressing shift(the price function) + click.
Attachments
tooltip4_no_shift_3165.diff
(1.44 KiB) Downloaded 112 times
tooltip#1.png
tooltip#1.png (45.58 KiB) Viewed 2112 times
tooltip#2.png
tooltip#2.png (29.73 KiB) Viewed 2112 times
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

How about

Code: Select all

if (_shift_pressed || _patches.always_measure_tool) {
? It is working, so if you want a diff now, write and I'll post it

I still need help with the rail construction. About bug from picture tooltip#1, it is TT bug with strings. Sometimes strings are not updated and you can see letters' remains scattered on the ground

About tooltip#2, that's what I'm currently wondering about. Slope height is equal to height at the base of the slope. For example, if you measure height and go uphill, OTTD won't see height difference.
However, if you want to make a slope fondation, which will level the land, OTTD will think it is 50 meters below.

All I can do, and I think I should do it, is to check the slope heading and modify displayed height difference.
Last edited by MeusH on 13 Nov 2005 13:29, edited 1 time in total.
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

MeusH wrote:How about

Code: Select all

if (_shift_pressed || _patches.always_measure_tool) {
I still need help with the rail construction. If you want a diff now, write and I'll post it
That sounds better! You can always send the diffs to my email addres ( ronald {AT} webfreakz {DOT} nl ) and i'll try to respond to it asap! :)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

webfreakz.nl wrote:
MeusH wrote:How about

Code: Select all

if (_shift_pressed || _patches.always_measure_tool) {
I still need help with the rail construction. If you want a diff now, write and I'll post it
That sounds better! You can always send the diffs to my email addres ( ronald {AT} webfreakz {DOT} nl ) and i'll try to respond to it asap! :)
I'll post all diffs here, just check this thread. I'll take care of fixing values on slopes and post next diff when I fix slopes or rail construction
Attachments
tooltip5_r3165.patch
The switch you're looking for is in "construction" tab
(13.42 KiB) Downloaded 84 times
User avatar
Villem
Tycoon
Tycoon
Posts: 3310
Joined: 28 Aug 2003 09:38

Post by Villem »

I think the height diffrence should be measured in squares not meters..
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

That's what I've been thinking about, but on the IRC we (I and developer) has discussed that we'll stick to minimap's height measurment (50 meter steps)
However, I think it can be also toggleable
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

webfreakz.nl, this one will fix some errors regarding height at slopes. But not all. Please test it.
Attachments
tooltip6_r3165.patch
(13.84 KiB) Downloaded 109 times
Bot_40
Engineer
Engineer
Posts: 105
Joined: 27 Jan 2005 18:56
Contact:

Post by Bot_40 »

This, imo, might be more logical as 3x1 since that's the actual area of land that will be flattened.
As it is, if you wanted to flatten land for a 7x7 station you would have to drag an 8x8 area which might be a bit confusing.
Attachments
tooltip_2_173.png
tooltip_2_173.png (29.73 KiB) Viewed 2068 times
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

Here the 2 screenshots about the bug :)
The arrow shows the drag-direction:
Attachments
tooltip#3.png
tooltip#3.png (18.76 KiB) Viewed 2054 times
tooltip#4.png
tooltip#4.png (17.98 KiB) Viewed 2051 times
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

It is because the white dot means tile under, to the left of it. This is why you're getting this bug. I'll think about it soon, but now I've met Darkvater on IRC and we'll talk about railway construction.
User avatar
mr.adam
Engineer
Engineer
Posts: 52
Joined: 27 Feb 2005 07:30
Location: Hungary

Post by mr.adam »

You could also write the estimated cost for these things. It would be very helpful to calculate expenditures when working with not too much money...
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

mr.adam wrote:You could also write the estimated cost for these things. It would be very helpful to calculate expenditures when working with not too much money...
what about pressing the Shift button before building? ;)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
mr.adam
Engineer
Engineer
Posts: 52
Joined: 27 Feb 2005 07:30
Location: Hungary

Post by mr.adam »

If you write the cost with the size & height data, pressing shift becomes unnecessary... You get one less "red" message, and a free hot key.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

I'm not sure about the query cost, since:
* It's easy to press shift and then repeat the procedure
* Functions I'm working on have nothing to do with type of construction (is it rail? road? station? tree planter tool?)

I may do some research on query cost later, first I'll work on finishing the current measurment patch.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 16 guests