Change: Show additional cost and refitted capacity in build vehicle window.

This commit is contained in:
peter1138
2019-03-23 21:06:46 +00:00
committed by PeterN
parent f8e6cd10ef
commit e6bb90543e
7 changed files with 165 additions and 64 deletions

View File

@@ -37,7 +37,15 @@ enum VehicleInvalidateWindowData {
VIWD_AUTOREPLACE = -4, ///< Autoreplace replaced the vehicle.
};
int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number);
/** Extra information about refitted cargo and capacity */
struct TestedEngineDetails {
Money cost; ///< Refit cost
CargoID cargo; ///< Cargo type
uint16 capacity; ///< Cargo capacity
uint16 mail_capacity; ///< Mail capacity if available
};
int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number, TestedEngineDetails &te);
void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip, VehicleID drag_dest = INVALID_VEHICLE);
void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip = 0);