src/ai/api/ai_vehicle.hpp
author truelight
Fri, 04 May 2007 22:59:59 +0000
branchnoai
changeset 9617 df9cedf12aab
parent 9615 f809cdc8e360
child 9654 b836eb5c521f
permissions -rw-r--r--
(svn r9786) [NoAI] -Fix: NeighbourRoad -> NeighbourRoadCount
[NoAI] -Fix: move AITileListValuators self-defined checks to AITile so we can call it per tile (instead of only via AITileList)
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     1
/* $Id$ */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     2
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     3
/** @file ai_vehicle.hpp Everything to query and build vehicles */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     4
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     5
#ifndef AI_VEHICLE_HPP
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     6
#define AI_VEHICLE_HPP
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     7
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     8
#include "ai_object.hpp"
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
     9
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    10
/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    11
 * Class that handles all vehicle related functions.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    12
 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    13
class AIVehicle : public AIObject {
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    14
public:
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    15
	/**
9529
5f26f4bc574b (svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents: 9526
diff changeset
    16
	 * The name of the class, needed by several sub-processes.
5f26f4bc574b (svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents: 9526
diff changeset
    17
	 */
5f26f4bc574b (svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents: 9526
diff changeset
    18
	static const char *GetClassName() { return "AIVehicle"; }
5f26f4bc574b (svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents: 9526
diff changeset
    19
5f26f4bc574b (svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents: 9526
diff changeset
    20
	/**
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    21
	 * Checks whether the given engine type is valid and buildable by you.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    22
	 * @param engine_id the engine to check.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    23
	 * @return true if and only if the engine type is valid.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    24
	 */
9497
f6678533ccba (svn r9369) [NoAI] -Codechange: make some IsValidXXX() function static, so they can be used by the other classes without the need for an instance.
rubidium
parents: 9491
diff changeset
    25
	static bool IsValidEngine(EngineID engine_id);
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    26
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    27
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    28
	 * Checks whether the given vehicle is valid and owned by you.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    29
	 * @param vehicle_id the vehicle to check.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    30
	 * @return true if and only if the vehicle is valid.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    31
	 */
9497
f6678533ccba (svn r9369) [NoAI] -Codechange: make some IsValidXXX() function static, so they can be used by the other classes without the need for an instance.
rubidium
parents: 9491
diff changeset
    32
	static bool IsValidVehicle(VehicleID vehicle_id);
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    33
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    34
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    35
	 * Find the best road vehicle for this job, given a minimum reliability.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    36
	 * @param cargo           the cargo the vehicle has to transport.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    37
	 * @param min_reliability the minimum reliability of the vehicle,
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    38
	 *   between 0 and 100.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    39
	 * @pre the tile at depot has a depot that can build the engine and
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    40
	 *   is owned by you.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    41
	 * @pre AICargo::IsValidCargo(cargo).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    42
	 * @pre min_reliability is between 0 and 100.
9522
f6c7f9f213c5 (svn r9442) [NoAI] -Documentation: do not reference any non-exported INVALID_* in the AI API documentation.
rubidium
parents: 9520
diff changeset
    43
	 * @return the engine with the best characteristics, or an invalid engine
f6c7f9f213c5 (svn r9442) [NoAI] -Documentation: do not reference any non-exported INVALID_* in the AI API documentation.
rubidium
parents: 9520
diff changeset
    44
	 *   when no engine was found given the cargo and reliability. Check the
f6c7f9f213c5 (svn r9442) [NoAI] -Documentation: do not reference any non-exported INVALID_* in the AI API documentation.
rubidium
parents: 9520
diff changeset
    45
	 *   return value using IsValidEngine.
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    46
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    47
	EngineID FindBestRoadVehicle(CargoID cargo, uint8 min_reliability);
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    48
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    49
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    50
	 * Builds a vehicle with the given engine at the given depot.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    51
	 * @param depot     the depot where the vehicle will be build.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    52
	 * @param engine_id the engine to use for this vehicle.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    53
	 * @pre the tile at depot has a depot that can build the engine and
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    54
	 *   is owned by you.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    55
	 * @pre IsValidEngine(engine_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    56
	 * @return the VehicleID of the new vehicle, or an invalid VehicleID when
9562
2f4087d63527 (svn r9500) [NoAI] -Add: document behavoir in test-mode
truelight
parents: 9559
diff changeset
    57
	 *   it failed. Check the return value using IsValidVehicle. In test-mode
2f4087d63527 (svn r9500) [NoAI] -Add: document behavoir in test-mode
truelight
parents: 9559
diff changeset
    58
	 *   0 is returned if it was successful; any other value indicates failure.
9563
2c0a7ea15d4c (svn r9501) [NoAI] -Add: document that you can't assign orders to a vehicle build in test-mode
truelight
parents: 9562
diff changeset
    59
	 * @note in test-mode it means you can't assign orders yet to this vehicle,
2c0a7ea15d4c (svn r9501) [NoAI] -Add: document that you can't assign orders to a vehicle build in test-mode
truelight
parents: 9562
diff changeset
    60
	 *   as the vehicle isn't really built yet. Build it for real first before
2c0a7ea15d4c (svn r9501) [NoAI] -Add: document that you can't assign orders to a vehicle build in test-mode
truelight
parents: 9562
diff changeset
    61
	 *   assigning orders.
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    62
	 */
9550
31e558ce0c04 (svn r9487) [NoAI] -Fix: BuildVehicle had as param vehicle_id in .hpp, which of course should be engine_id
truelight
parents: 9541
diff changeset
    63
	VehicleID BuildVehicle(TileIndex depot, EngineID engine_id);
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    64
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    65
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    66
	 * Clones a vehicle at the given depot, copying or cloning it's orders.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    67
	 * @param depot        the depot where the vehicle will be build.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    68
	 * @param vehicle_id   the vehicle to use as example for the new vehicle.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    69
	 * @param share_orders should the orders be copied or shared?
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    70
	 * @pre the tile at depot has a depot.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    71
	 * @pre IsValidVehicle(vehicle_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    72
	 * @return the VehicleID of the new vehicle, or an invalid VehicleID when
9562
2f4087d63527 (svn r9500) [NoAI] -Add: document behavoir in test-mode
truelight
parents: 9559
diff changeset
    73
	 *   it failed. Check the return value using IsValidVehicle. In test-mode
2f4087d63527 (svn r9500) [NoAI] -Add: document behavoir in test-mode
truelight
parents: 9559
diff changeset
    74
	 *   0 is returned if it was successful; any other value indicates failure.
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    75
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    76
	VehicleID CloneVehicle(TileIndex depot, VehicleID vehicle_id, bool share_orders);
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    77
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    78
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    79
	 * Refits a vehicle to the given cargo type
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    80
	 * @param vehicle_id the vehicle to refit
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    81
	 * @param cargo      the cargo to refit to
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    82
	 * @pre IsValidVehicle(vehicle_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    83
	 * @pre AICargo::IsValidCargo(cargo)
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    84
	 * @pre you must own the vehicle
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    85
	 * @pre the vehicle must be stopped in the depot
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    86
	 * @return true if and only if the refit succeeded.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    87
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    88
	bool RefitVehicle(VehicleID vehicle_id, CargoID cargo);
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    89
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    90
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    91
	 * Sells the given vehicle.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    92
	 * @param vehicle_id the vehicle to sell.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    93
	 * @pre IsValidVehicle(vehicle_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    94
	 * @pre you must own the vehicle
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    95
	 * @pre the vehicle must be stopped in the depot
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    96
	 * @return true if and only if the vehicle has been sold.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    97
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    98
	bool SellVehicle(VehicleID vehicle_id);
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
    99
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   100
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   101
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   102
	 * Sends the given vehicle to a depot.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   103
	 * @param vehicle_id the vehicle to send to a depot.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   104
	 * @pre IsValidVehicle(vehicle_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   105
	 * @return true if and only if the vehicle has been sent to a depot.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   106
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   107
	bool SendVehicleToDepot(VehicleID vehicle_id);
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   108
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   109
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   110
	 * Starts or stops the given vehicle depending on the current state.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   111
	 * @param vehicle_id the vehicle to start/stop.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   112
	 * @pre IsValidVehicle(vehicle_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   113
	 * @return true if and only if the vehicle has been started or stopped.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   114
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   115
	bool StartStopVehicle(VehicleID vehicle_id);
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   116
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   117
	/**
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   118
	 * Skips the current order of the given vehicle.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   119
	 * @param vehicle_id the vehicle to skip the order for.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   120
	 * @pre IsValidVehicle(vehicle_id).
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   121
	 * @return true if and only if the order has been skipped.
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   122
	 */
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   123
	bool SkipVehicleOrder(VehicleID vehicle_id);
9615
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   124
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   125
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   126
	 * Get the current location of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   127
	 * @param vehicle_id the vehicle to get the location of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   128
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   129
	 * @return the tile the vehicle is currently on.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   130
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   131
	static TileIndex GetLocation(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   132
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   133
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   134
	 * Get the engine-type of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   135
	 * @param vehicle_id the vehicle to get the engine-type of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   136
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   137
	 * @return the engine type the vehicle has.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   138
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   139
	static EngineID GetEngineType(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   140
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   141
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   142
	 * Get the unitnumber of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   143
	 * @param vehicle_id the vehicle to get the unitnumber of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   144
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   145
	 * @return the unitnumber the vehicle has.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   146
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   147
	static int32 GetUnitNumber(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   148
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   149
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   150
	 * Get the current age of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   151
	 * @note age is in days.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   152
	 * @param vehicle_id the vehicle to get the age of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   153
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   154
	 * @return the current age the vehicle has.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   155
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   156
	static int32 GetAge(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   157
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   158
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   159
	 * Get the max age of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   160
	 * @note age is in days.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   161
	 * @param vehicle_id the vehicle to get the age of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   162
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   163
	 * @return the max age the vehicle has.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   164
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   165
	static int32 GetMaxAge(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   166
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   167
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   168
	 * Get the age a vehicle has left (max - current).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   169
	 * @note age is in days.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   170
	 * @param vehicle_id the vehicle to get the age of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   171
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   172
	 * @return the age the vehicle has left.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   173
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   174
	static int32 GetAgeLeft(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   175
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   176
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   177
	 * Get the current profit of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   178
	 * @param vehicle_id the vehicle to get the profit of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   179
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   180
	 * @return the current profit the vehicle has.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   181
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   182
	static int32 GetProfitThisYear(VehicleID vehicle_id);
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   183
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   184
	/**
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   185
	 * Get the profit of last year of a vehicle.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   186
	 * @param vehicle_id the vehicle to get the profit of.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   187
	 * @pre IsValidVehicle(vehicle_id).
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   188
	 * @return the profit the vehicle had last year.
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   189
	 */
f809cdc8e360 (svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents: 9596
diff changeset
   190
	static int32 GetProfitLastYear(VehicleID vehicle_id);
9491
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   191
};
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   192
351239ad524c (svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff changeset
   193
#endif /* AI_VEHICLE_HPP */