Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Sep 02, 2010 6:16 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 8:13 am 
Transport Coordinator
Transport Coordinator
Offline

Joined: Mon Feb 06, 2006 11:58 pm
Posts: 339
Some useful spinoff from copy&paste:

This patch allows to hold Ctrl while dragging a bridge,
which instantly builds the fastest available bridge,
without showing the bridge selection window.

I thought this may be useful because most players build the fastest available bridge anyway.

Please comment, or include ;)

Greetings,
Frostregen


Attachments:
File comment: patch for SVN r12558
fastest_bridge_v1.diff [2.1 KiB]
Downloaded 93 times

_________________
Copy & Paste Patch for OTTD
Distant-Joined Stations Patch for OTTD
Eyecandy Patch for OTTD
Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 8:30 am 
Chairman
Chairman
User avatar
Offline

Joined: Fri Jan 25, 2008 7:32 am
Posts: 774
Location: No(r)way
Sweet! Hope this goes into trunk!

_________________
..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRF: Norwegian Funny Town Names v2.13 | Favorites: GRFCrawler | ISR | OpenGFX | WIKI | Now Playing: OTTD r13003m MyIn |

Ewo-wox-co-dah-wa


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 8:49 am 
Engineer
Engineer
User avatar
Offline

Joined: Thu Feb 07, 2008 9:15 am
Posts: 36
Very good idea!
I hate to scroll down the bridge menu to find the fastest.

_________________
Have a N.I.C.E. day!
Indiana


Top
 Profile E-mail  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 9:56 am 
Chairman
Chairman
User avatar
Offline

Joined: Sun Jun 18, 2006 6:18 pm
Posts: 768
Location: Switzerland
Nice idea.

Also possible to make something like "use the last used" bridge?

Greets
Ammler

_________________
Image
Town Names: Image Swiss / Image French ยท Image Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!


Top
 Profile E-mail  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 10:53 am 
Tycoon
Tycoon
User avatar
Offline

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 3075
Ammler wrote:
Also possible to make something like "use the last used" bridge?

Yeah, very nice idea and even better, if Ammler's suggestion could be implemented as well (maybe with Alt or something).

_________________
Image
OpenTTD: manual | online content | translations | #openttdcoop: blog | wiki | public server | dev server | NewGRF pack | DevZone
Base Sets: OpenSFX | OpenMSX | OpenGFX | NewGRF: Swedish Rails | Variable Snowline | OpenGFX+ | ComicHouses


Top
 Profile E-mail  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 11:04 am 
Tycoon
Tycoon
User avatar
Offline

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 2917
Location: /home/sweden
planetmaker wrote:
Ammler wrote:
Also possible to make something like "use the last used" bridge?

Yeah, very nice idea and even better, if Ammler's suggestion could be implemented as well (maybe with Alt or something).

Alt+(left)Drag is commonly used by window-managers to move windows. (and right-drag to resize them)

But we could have either Alt or Super (windows key). Will not suit all either since Super is possible used by some windows-alike WMs such as gnome/kde. Maybe someone have a better idea?

_________________
My contributions (AIs, patches, OpenTTD Auto Updater, and some sprites)


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 4:39 pm 
Transport Coordinator
Transport Coordinator
Offline

Joined: Sat Feb 03, 2007 6:53 pm
Posts: 366
Location: Leeds, England
Is there a programmable difference between right and left ctrl?


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 7:13 pm 
Tycoon
Tycoon
User avatar
Offline

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 2917
Location: /home/sweden
Yes, but OTTD generalize the modifiers as just one 'key' of each type. At least if you look at the mod-bits. I don't remember if the CTRL-key exist also as a usual keycode where there could exist two keycodes one for left and one for right. But the OTTD standard way to read if a modifier is pressed is to look at the mod-bits.

(at least 1/2 a year ago, when I last worked on configurable hotkeys)

_________________
My contributions (AIs, patches, OpenTTD Auto Updater, and some sprites)


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri Apr 04, 2008 11:03 pm 
Traffic Manager
Traffic Manager
User avatar
Offline

Joined: Mon Mar 10, 2008 2:45 am
Posts: 247
Location: Australia
Excellent, thanks

_________________
Nintendo DS OpenTTD ---- Latest YAPP Patch ---- OpenTTD Wiki ---- Image ---- Transport Tycoon PSX
Australia Scenario V1.0 ---- Luukland's Tasmania Scenario ---- Italy Scenario 0.35 --- Build A Town Patch


Top
 Profile E-mail  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sat Apr 05, 2008 5:45 pm 
Tycoon
Tycoon
User avatar
Offline

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1404
Location: The sunny side of Alps
Thanks!

This indeed is a really useful feature. I usually build the fastest bridge, only perhaps sometimes I prefer the "golden" tubular over the "silver" one... :-)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Fri May 16, 2008 4:41 pm 
Tycoon
Tycoon
User avatar
Offline

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 3075
updated to trunk (r13058)


Attachments:
File comment: fastest bridge via Ctrl-Drag, updated to r13058
fastest_bridge_v1_r13058.diff [2.09 KiB]
Downloaded 38 times

_________________
Image
OpenTTD: manual | online content | translations | #openttdcoop: blog | wiki | public server | dev server | NewGRF pack | DevZone
Base Sets: OpenSFX | OpenMSX | OpenGFX | NewGRF: Swedish Rails | Variable Snowline | OpenGFX+ | ComicHouses
Top
 Profile E-mail  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sun Jun 08, 2008 8:26 am 
Tycoon
Tycoon
User avatar
Offline

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 3075
any chance for an updated? I currently fail to updated it properly :S

_________________
Image
OpenTTD: manual | online content | translations | #openttdcoop: blog | wiki | public server | dev server | NewGRF pack | DevZone
Base Sets: OpenSFX | OpenMSX | OpenGFX | NewGRF: Swedish Rails | Variable Snowline | OpenGFX+ | ComicHouses


Top
 Profile E-mail  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sun Jun 08, 2008 1:27 pm 
OpenTTD Developer
OpenTTD Developer
Offline

Joined: Sun Sep 09, 2007 5:03 am
Posts: 915
Location: home
yes

(edited: replaced attached patch file with new one with code/style changes as requested by Frostregen below)


Attachments:
File comment: fastest bridge patch, with code changes as requested
fastest_bridge_v1_r13418.patch [2.13 KiB]
Downloaded 36 times


Last edited by Alberth on Sun Jun 08, 2008 4:35 pm, edited 2 times in total.
Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sun Jun 08, 2008 3:58 pm 
Transport Coordinator
Transport Coordinator
Offline

Joined: Mon Feb 06, 2006 11:58 pm
Posts: 339
If someone updates it again, consider using this version
http://bugs.openttd.org/?getfile=2853
as a base.
There were some coding/style changes, which should not be lost.

Thx,
Frostregen

_________________
Copy & Paste Patch for OTTD
Distant-Joined Stations Patch for OTTD
Eyecandy Patch for OTTD


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sun Jun 08, 2008 4:34 pm 
OpenTTD Developer
OpenTTD Developer
Offline

Joined: Sun Sep 09, 2007 5:03 am
Posts: 915
Location: home
done (by manually patching the patch-file). Compiles and runs against current trunk (13418)

For new version see my previous post (removed previous version of the attachement as it is not useful any more anyway).

Albert


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sun Jun 08, 2008 4:51 pm 
Tycoon
Tycoon
Offline

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1824
Well, you are now able to sort bridges by speed in trunk. So I think this patch is not needed so urgently anymore...

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
 Profile  
 
 Post subject: Re: Ctrl-Drag Bridge: instantly build fastest available
PostPosted: Sun Jun 08, 2008 5:43 pm 
Tycoon
Tycoon
User avatar
Offline

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 3075
Roujin wrote:
Well, you are now able to sort bridges by speed in trunk. So I think this patch is not needed so urgently anymore...

True. But you still save one mouse click. Speed rulez :)

Frostregen & Albert: Thanks for the update.

_________________
Image
OpenTTD: manual | online content | translations | #openttdcoop: blog | wiki | public server | dev server | NewGRF pack | DevZone
Base Sets: OpenSFX | OpenMSX | OpenGFX | NewGRF: Swedish Rails | Variable Snowline | OpenGFX+ | ComicHouses


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Loans | Debt Help | House Insurance | Cheap Home Insurance | WoW Gold
Powered by phpBB © 2000-2009 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2010.
Hosted by Zernebok.