src/train.h
changeset 7412 51db351a3313
parent 7135 3c1bcca0d6bb
child 7477 ee28f55ab5e8
equal deleted inserted replaced
7411:6aa1fd67a914 7412:51db351a3313
   260 struct Train : public Vehicle {
   260 struct Train : public Vehicle {
   261 	/** Initializes the Vehicle to a train */
   261 	/** Initializes the Vehicle to a train */
   262 	Train() { this->type = VEH_TRAIN; }
   262 	Train() { this->type = VEH_TRAIN; }
   263 
   263 
   264 	/** We want to 'destruct' the right class. */
   264 	/** We want to 'destruct' the right class. */
   265 	virtual ~Train() {}
   265 	virtual ~Train() { this->PreDestructor(); }
   266 
   266 
   267 	const char *GetTypeString() const { return "train"; }
   267 	const char *GetTypeString() const { return "train"; }
   268 	void MarkDirty();
   268 	void MarkDirty();
   269 	void UpdateDeltaXY(Direction direction);
   269 	void UpdateDeltaXY(Direction direction);
   270 	ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; }
   270 	ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; }