src/ai/api/ai_industrylist_valuator.hpp
author truebrain
Thu, 28 Feb 2008 01:11:23 +0000
branchnoai
changeset 9803 c86d5834fb11
parent 9781 d583b3eb60e0
permissions -rw-r--r--
(svn r12309) [NoAI] -Codechange: optimize a little bit (a very small little bit, but every bit counts :) ) (glx)
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     1
/* $Id$ */
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     2
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
     3
/** @file ai_industrylist_valuator.hpp all the valuators for AIIndustryList */
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     4
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     5
#ifndef AI_INDUSTRYLIST_VALUATOR_HPP
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     6
#define AI_INDUSTRYLIST_VALUATOR_HPP
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     7
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     8
#include "ai_abstractlist.hpp"
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
     9
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    10
/**
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    11
 * Get the production rate of the cargo for entries in an AIIndustryList
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    12
 *  instance. This is the amount of production you can expect in a month.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    13
 * @note Resulting items are of the type int32.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    14
 * @note Can only operate on an AIIndustryList instance.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    15
 * @ingroup AIIndustryList
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    16
 */
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    17
class AIIndustryList_vProduction : public AIAbstractList::Valuator {
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    18
public:
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    19
	static const char *GetClassName() { return "AIIndustryList_vProduction"; }
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    20
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    21
	/**
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    22
	 * @param cargo_id The cargo to check the production rate of.
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    23
	 */
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    24
	AIIndustryList_vProduction(CargoID cargo_id) :
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    25
		cargo_id(cargo_id)
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    26
	{}
9710
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    27
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    28
private:
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    29
	CargoID cargo_id;
9710
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    30
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    31
	const char *GetListName() const { return "AIIndustryList"; }
9710
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    32
	int32 Valuate(int32 industry) const;
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    33
};
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    34
ba44f8c1fd52 (svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents: 9655
diff changeset
    35
/**
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    36
 * See which entries in the AIIndustryList instance accepts a given cargo.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    37
 * @note Resulting items are of the type bool.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    38
 * @note Can only operate on an AIIndustryList instance.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    39
 * @ingroup AIIndustryList
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    40
 */
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    41
class AIIndustryList_vCargoAccepted : public AIAbstractList::Valuator {
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    42
public:
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    43
	static const char *GetClassName() { return "AIIndustryList_vCargoAccepted"; }
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    44
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    45
	/**
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    46
	 * @param cargo_id Check if this cargo is accepted.
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    47
	 */
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    48
	AIIndustryList_vCargoAccepted(CargoID cargo_id) :
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    49
		cargo_id(cargo_id)
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    50
	{}
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    51
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    52
private:
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    53
	CargoID cargo_id;
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    54
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    55
	const char *GetListName() const { return "AIIndustryList"; }
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    56
	int32 Valuate(int32 industry) const;
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    57
};
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    58
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    59
/**
9756
7e637829cbd3 (svn r12241) [NoAI] -Fix r12236: global search/replace to the unreadable documentation! WHOHO! (tnx Progman)
truebrain
parents: 9753
diff changeset
    60
 * Get the location for entries in an AIIndustryList instance.
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    61
 * @note Resulting items are of the type TileIndex.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    62
 * @note Can only operate on an AIIndustryList instance.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    63
 * @ingroup AIIndustryList
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    64
 */
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    65
class AIIndustryList_vLocation : public AIAbstractList::Valuator {
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    66
public:
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    67
	static const char *GetClassName() { return "AIIndustryList_vGetLocation"; }
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    68
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    69
private:
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    70
	const char *GetListName() const { return "AIIndustryList"; }
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    71
	int32 Valuate(int32 industry) const;
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    72
};
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
    73
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    74
/**
9756
7e637829cbd3 (svn r12241) [NoAI] -Fix r12236: global search/replace to the unreadable documentation! WHOHO! (tnx Progman)
truebrain
parents: 9753
diff changeset
    75
 * Get the manhattan distance to a tile for entries in an AIIndustryList instance.
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    76
 * @note Resulting items are of the type uint32.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    77
 * @note Can only operate on an AIIndustryList instance.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    78
 * @ingroup AIIndustryList
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    79
 */
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    80
class AIIndustryList_vDistanceManhattanToTile : public AIAbstractList::Valuator {
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    81
public:
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
    82
	static const char *GetClassName() { return "AIIndustryList_vDistanceManhattanToTile"; }
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    83
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    84
	/**
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    85
	 * @param tile The tile to get the distance to.
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    86
	 */
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    87
	AIIndustryList_vDistanceManhattanToTile(TileIndex tile) :
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    88
		tile(tile)
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
    89
	{}
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    90
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    91
private:
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    92
	TileIndex tile;
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    93
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
    94
	const char *GetListName() const { return "AIIndustryList"; }
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    95
	int32 Valuate(int32 station) const;
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    96
};
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    97
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
    98
/**
9781
d583b3eb60e0 (svn r12276) [NoAI] -Fix: more typos (tnx yorick)
truebrain
parents: 9778
diff changeset
    99
 * Get the square distance to a tile for entries in an AIIndustryList instance.
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   100
 * @note Resulting items are of the type uint32.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   101
 * @note Can only operate on an AIIndustryList instance.
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   102
 * @ingroup AIIndustryList
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   103
 */
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
   104
class AIIndustryList_vDistanceSquareToTile : public AIAbstractList::Valuator {
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   105
public:
9753
7209db94ad12 (svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents: 9710
diff changeset
   106
	static const char *GetClassName() { return "AIIndustryList_vDistanceSquareToTile"; }
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   107
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   108
	/**
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   109
	 * @param tile The tile to get the distance to.
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   110
	 */
9778
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   111
	AIIndustryList_vDistanceSquareToTile(TileIndex tile) :
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   112
		tile(tile)
38560cd27070 (svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents: 9772
diff changeset
   113
	{}
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   114
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   115
private:
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   116
	TileIndex tile;
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   117
9772
c1035f0ac732 (svn r12265) [NoAI] -Add: added a general protection that doesn't allow people using valuators on lists that aren't ment for those valuators
truebrain
parents: 9756
diff changeset
   118
	const char *GetListName() const { return "AIIndustryList"; }
9655
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   119
	int32 Valuate(int32 station) const;
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   120
};
e8e43f333832 (svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents: 9649
diff changeset
   121
9649
bc8c06513f5b (svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff changeset
   122
#endif /* AI_INDUSTRYLIST_VALUATOR_HPP */