Hotkey for refit :?:

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
Trumsi
Engineer
Engineer
Posts: 3
Joined: 23 Sep 2010 10:32

Hotkey for refit :?:

Post by Trumsi » 09 Feb 2019 18:21

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?

Eddi
Tycoon
Tycoon
Posts: 7410
Joined: 17 Jan 2007 00:14

Re: Hotkey for refit :?:

Post by Eddi » 09 Feb 2019 18:25

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 :)

Trumsi
Engineer
Engineer
Posts: 3
Joined: 23 Sep 2010 10:32

Re: Hotkey for refit :?:

Post by Trumsi » 09 Feb 2019 20:55

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.

User avatar
kamnet
Moderator
Moderator
Posts: 6694
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Hotkey for refit :?:

Post by kamnet » 10 Feb 2019 15:44

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.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9280
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Hotkey for refit :?:

Post by planetmaker » 10 Feb 2019 16:01

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)

Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 7 guests