src/vehicle.h
changeset 7984 c539c9368e3c
parent 7982 539e32cc37ce
child 7986 881998b115c2
equal deleted inserted replaced
7983:06d272a9618b 7984:c539c9368e3c
   425 	 * @return the vehicle's maximum speed
   425 	 * @return the vehicle's maximum speed
   426 	 */
   426 	 */
   427 	virtual int GetDisplayMaxSpeed() const { return 0; }
   427 	virtual int GetDisplayMaxSpeed() const { return 0; }
   428 
   428 
   429 	/**
   429 	/**
       
   430 	 * Gets the running cost of a vehicle
       
   431 	 * @return the vehicle's running cost
       
   432 	 */
       
   433 	virtual Money GetRunningCost() const { return 0; }
       
   434 
       
   435 	/**
   430 	 * Calls the tick handler of the vehicle
   436 	 * Calls the tick handler of the vehicle
   431 	 */
   437 	 */
   432 	virtual void Tick() {};
   438 	virtual void Tick() {};
       
   439 
       
   440 	/**
       
   441 	 * Gets the running cost of a vehicle  that can be sent into SetDParam for string processing.
       
   442 	 * @return the vehicle's running cost
       
   443 	 */
       
   444 	Money GetDisplayRunningCost() const { return (this->GetRunningCost() >> 8); }
   433 
   445 
   434 	bool IsValid() const { return this->type != VEH_INVALID; }
   446 	bool IsValid() const { return this->type != VEH_INVALID; }
   435 };
   447 };
   436 
   448 
   437 /**
   449 /**