case BT_FOUNDATION: return ::GetPrice(PR_BUILD_FOUNDATION, 1, nullptr);
case BT_TERRAFORM: return ::GetPrice(PR_TERRAFORM, 1, nullptr);
case BT_BUILD_TREES: return ::GetPrice(PR_BUILD_TREES, 1, nullptr);
case BT_CLEAR_GRASS: return ::GetPrice(PR_CLEAR_GRASS, 1, nullptr);
case BT_CLEAR_ROUGH: return ::GetPrice(PR_CLEAR_ROUGH, 1, nullptr);
case BT_CLEAR_ROCKY: return ::GetPrice(PR_CLEAR_ROCKS, 1, nullptr);
case BT_CLEAR_FIELDS: return ::GetPrice(PR_CLEAR_FIELDS, 1, nullptr);
case BT_CLEAR_HOUSE: return ::GetPrice(PR_CLEAR_HOUSE, 1, nullptr);
case BT_CLEAR_WATER: return ::GetPrice(PR_CLEAR_WATER, 1, nullptr);
default: return -1;
}
}
src/script/api/script_tile.hpp
➞
Show inline comments
@@ -110,24 +110,25 @@ public:
/**
* Get the base cost for building/clearing several things.
*/
enum BuildType {
BT_FOUNDATION, ///< Build a foundation under something
BT_TERRAFORM, ///< Terraform
BT_BUILD_TREES, ///< Build trees
BT_CLEAR_GRASS, ///< Clear a tile with just grass
BT_CLEAR_ROUGH, ///< Clear a rough tile
BT_CLEAR_ROCKY, ///< Clear a tile with rocks
BT_CLEAR_FIELDS, ///< Clear a tile with farm fields
BT_CLEAR_HOUSE, ///< Clear a tile with a house
BT_CLEAR_WATER, ///< Clear a tile with either river or sea
};
/**
* The types of terrain a tile can have.
*
* @note When a desert or rainforest tile are changed, their terrain type will remain the same. In other words, a sea tile can be of the desert terrain type.
* @note The snow terrain type can change to the normal terrain type and vice versa based on landscaping or variable snow lines from NewGRFs.
*/
enum TerrainType {
TERRAIN_NORMAL, ///< A normal tile (default); not desert, rainforest or snow.
TERRAIN_DESERT, ///< A tile in the desert (manually set in in scenarios, below certain height and certain distance from water in random games).
TERRAIN_RAINFOREST, ///< A tile in the rainforest (manually set in scenarios, certain distance away from deserts in random games),
@@ -150,28 +151,45 @@ public:
/**
* Check if this tile is buildable in a rectangle around a tile, with the