diff options
author | frosch <frosch@openttd.org> | 2015-10-30 17:27:21 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-10-30 17:27:21 +0000 |
commit | 0974f5489bea9ebb8c2a4b3aa70b8de257a9ab64 (patch) | |
tree | b7bf00c61ebe071a1c57a6c91fb9751e27a486de /src/vehicle_gui.cpp | |
parent | 2d636266f59e8f5e88c3460b9adb8889442108d8 (diff) | |
download | openttd-0974f5489bea9ebb8c2a4b3aa70b8de257a9ab64.tar.xz |
(svn r27428) -Fix: When selecting a refit cargo for orders, do not check whether the vehicle is in a depot or station, and do not ask whether the vehicle currently allows station-refitting. Also hide the refit cost for orders, it is not predictable.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 4ace090dd..10f1d952d 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -701,7 +701,10 @@ struct RefitWindow : public Window { if (_returned_mail_refit_capacity > 0) { SetDParam(2, CT_MAIL); SetDParam(3, _returned_mail_refit_capacity); - if (money <= 0) { + if (this->order != INVALID_VEH_ORDER_ID) { + /* No predictable cost */ + return STR_PURCHASE_INFO_AIRCRAFT_CAPACITY; + } else if (money <= 0) { SetDParam(4, -money); return STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT; } else { @@ -709,7 +712,11 @@ struct RefitWindow : public Window { return STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT; } } else { - if (money <= 0) { + if (this->order != INVALID_VEH_ORDER_ID) { + /* No predictable cost */ + SetDParam(2, STR_EMPTY); + return STR_PURCHASE_INFO_CAPACITY; + } else if (money <= 0) { SetDParam(2, -money); return STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT; } else { |