FS#3127 - Shift clicked orders transfer and leave empty

Attached to Project: OpenTTD
Opened by Emin (niw3) - Sunday, 16 August 2009, 21:24 GMT
Last edited by Remko Bijker (Rubidium) - Friday, 22 October 2010, 14:42 GMT
Type Patch
Category Interface
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Version?
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch lets the player give "transfer and leave empty" orders while holding the SHIFT key. Without the patch shift clicked orders show a popup window with an estimated cost of $0. This feature could be extremely handy if you love to build lots of feeder vehicles distributed over lots of stations.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Friday, 22 October 2010, 14:42 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Transfers are now "leave empty" by default.
Comment by Jose Soler (Terkhen) - Monday, 17 August 2009, 09:18 GMT
I propose to add another combination: giving orders while pressing ALT creates a "unload and leave empty" order. That would complete keyboard support for all common types of orders.
Comment by Thijs Marinussen (Yexo) - Tuesday, 18 August 2009, 08:25 GMT
The main problem I have with using the shift key is that is makes shift inconsistent. Currently it's meaning is _always_ to just test an action and get the cost. You can argue that some actions don't need testing because they are free (like adding orders), but then how to make it clear to a users which actions can be tested with shift and which not?

Besides that I don't like the changes you've done in command.cpp. As I said above, using shift for testing can probably disabled for other commands. Instead of hard coding those commands in command.cpp it's better to create a new flag in DoCommandFlag and check for that flag.
Comment by Emin (niw3) - Tuesday, 18 August 2009, 17:08 GMT
I think it is clear to users that only construction, buy/sell operations, and destruction can be subject to cost estimation. I think order manipulations should not be cost estimated at all, as you say they are obviously free. If you accidentally press SHIFT (instead of CTRL) while adding orders, the GUI will give you a meaningless estimated cost. And you have to spend another click to close it.

As for the hard coding command types in command.cpp, you are absolutely right. That's a quick-dirty solution obviously.