Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Fri Feb 22, 2019 11:39 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Hotkey for refit :?:
PostPosted: Sat Feb 09, 2019 6:21 pm 
Offline
Engineer
Engineer

Joined: Thu Sep 23, 2010 10:32 am
Posts: 3
Hi,

I´m currently playing in multiplayer server, which is running latest Openttd version 1.8.0.

Currently i´m learning to use different hotkeys in order to make building much faster, some of which are customizable either in hotkeys.cfg file or throught openttd settings interface + some are written in openttd wiki.

I was wondering, is there possibility for me to modify or add new hotkey to hotkeys.cfg file (or through some other method) for train order "Refit at station -> Available cargo" option?


Top
   
 Post subject: Re: Hotkey for refit :?:
PostPosted: Sat Feb 09, 2019 6:25 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7281
adding hotkeys not found in hotkeys.cfg probably requires editing the source code

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
 Post subject: Re: Hotkey for refit :?:
PostPosted: Sat Feb 09, 2019 8:55 pm 
Offline
Engineer
Engineer

Joined: Thu Sep 23, 2010 10:32 am
Posts: 3
Seems so yes.

Did some more digging and found that all possible shortcut combinations are defined by order_gui.cpp on source code level (https://docs.openttd.org/order__gui_8cpp.html).
For now gotta still use that drop down menu to select needed refit option for trains.

Looking through order_gui.cpp code, it will need some additional coding, but is probably doable.
For now can only hope, that maybe in some future openttd release on someday, developers will add "refit to available cargo" to possible hotkey combinations.


Top
   
 Post subject: Re: Hotkey for refit :?:
PostPosted: Sun Feb 10, 2019 3:44 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Sep 28, 2009 5:15 pm
Posts: 6463
Location: Eastern KY
Trumsi wrote:
Seems so yes.

Did some more digging and found that all possible shortcut combinations are defined by order_gui.cpp on source code level (https://docs.openttd.org/order__gui_8cpp.html).
For now gotta still use that drop down menu to select needed refit option for trains.

Looking through order_gui.cpp code, it will need some additional coding, but is probably doable.
For now can only hope, that maybe in some future openttd release on someday, developers will add "refit to available cargo" to possible hotkey combinations.


Make a patch, submit it to the devs for review. Even if it is just adding some new hotkeys.

_________________
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Image

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | RoadTypes?


Top
   
 Post subject: Re: Hotkey for refit :?:
PostPosted: Sun Feb 10, 2019 4:01 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9176
Location: Sol d
kamnet wrote:
Trumsi wrote:
Seems so yes.

Did some more digging and found that all possible shortcut combinations are defined by order_gui.cpp on source code level (https://docs.openttd.org/order__gui_8cpp.html).
For now gotta still use that drop down menu to select needed refit option for trains.

Looking through order_gui.cpp code, it will need some additional coding, but is probably doable.
For now can only hope, that maybe in some future openttd release on someday, developers will add "refit to available cargo" to possible hotkey combinations.


Make a patch, submit it to the devs for review. Even if it is just adding some new hotkeys.


That's how I started with OpenTTD work ;)
(svn r13481) -Codechange: add 'B' keyboard shortcut to build aqueduct (planetmaker)

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 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:  
Powered by phpBB © 2000-2019 phpBB Limited

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