forked from mirror/OpenTTD
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
This commit is contained in:
@@ -270,6 +270,8 @@ struct Train : public Vehicle {
|
||||
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; }
|
||||
WindowClass GetVehicleListWindowClass() const { return WC_TRAINS_LIST; }
|
||||
void PlayLeaveStationSound() const;
|
||||
bool IsPrimaryVehicle() const { return IsFrontEngine(this); }
|
||||
bool HasFront() const { return true; }
|
||||
};
|
||||
|
||||
#endif /* TRAIN_H */
|
||||
|
Reference in New Issue
Block a user