diff options
author | rubidium <rubidium@openttd.org> | 2011-12-15 18:40:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-12-15 18:40:15 +0000 |
commit | 18d929aa21f42f292fd249e6d5feb6bf71ba93ae (patch) | |
tree | 5a26d0c7d569a26381b3b3afa83afeac3e315763 /src/script/api/script_town.hpp | |
parent | bb564bc34dd5db62d994eac10f88a81979a0f89c (diff) | |
download | openttd-18d929aa21f42f292fd249e6d5feb6bf71ba93ae.tar.xz |
(svn r23521) -Codechange: use the actual enum values from the 'core' in the API when they refer to the in-game values in the cases where that is possible and sensible
Diffstat (limited to 'src/script/api/script_town.hpp')
-rw-r--r-- | src/script/api/script_town.hpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/script/api/script_town.hpp b/src/script/api/script_town.hpp index 83da1d796..63f3a173a 100644 --- a/src/script/api/script_town.hpp +++ b/src/script/api/script_town.hpp @@ -14,6 +14,7 @@ #include "script_cargo.hpp" #include "script_company.hpp" +#include "../../town_type.h" /** * Class that handles all town related functions. @@ -25,7 +26,7 @@ public: * Actions that one can perform on a town. */ enum TownAction { - /* Values are important, as they represent the internal state of the game. */ + /* Note: these values represent part of the in-game order of the _town_action_proc array */ /** * The cargo ratings temporary gains 25% of rating (in @@ -94,12 +95,14 @@ public: * Possible layouts for the roads in a town. */ enum RoadLayout { - /* Order IS important, as it matches an in-game value */ - ROAD_LAYOUT_ORIGINAL, ///< Original algorithm (min. 1 distance between roads). - ROAD_LAYOUT_BETTER_ROADS, ///< Extended original algorithm (min. 2 distance between roads). - ROAD_LAYOUT_2x2, ///< Geometric 2x2 grid algorithm - ROAD_LAYOUT_3x3, ///< Geometric 3x3 grid algorithm - ROAD_LAYOUT_INVALID = -1, ///< The layout for invalid towns. + /* Note: these values represent part of the in-game TownLayout enum */ + ROAD_LAYOUT_ORIGINAL = ::TL_ORIGINAL, ///< Original algorithm (min. 1 distance between roads). + ROAD_LAYOUT_BETTER_ROADS = ::TL_BETTER_ROADS, ///< Extended original algorithm (min. 2 distance between roads). + ROAD_LAYOUT_2x2 = ::TL_2X2_GRID, ///< Geometric 2x2 grid algorithm + ROAD_LAYOUT_3x3 = ::TL_3X3_GRID, ///< Geometric 3x3 grid algorithm + + /* Custom added value, only valid for this API */ + ROAD_LAYOUT_INVALID = -1, ///< The layout for invalid towns. }; /** |