diff options
author | rubidium <rubidium@openttd.org> | 2013-04-30 17:16:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-04-30 17:16:32 +0000 |
commit | 5730e63a10f8edfe2b1495242f19b9b60589a4e2 (patch) | |
tree | d76689f8ad86c50720c67c76544f09ee2238c76a /src/script/api/game | |
parent | 5b55afb7bd21ae6fc1cc6480aac2946262d63684 (diff) | |
download | openttd-5730e63a10f8edfe2b1495242f19b9b60589a4e2.tar.xz |
(svn r25213) -Fix [FS#5537]: clarify on which tiles IsDesertTile and IsSnowTile work, i.e. the ones without infrastructure or buildings
-Feature: introduce GetTerrainType which allows one to get that information for tiles with buildings and infrastructure as well
Diffstat (limited to 'src/script/api/game')
-rw-r--r-- | src/script/api/game/game_tile.hpp.sq | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/api/game/game_tile.hpp.sq b/src/script/api/game/game_tile.hpp.sq index c2d5cb55e..6224919ff 100644 --- a/src/script/api/game/game_tile.hpp.sq +++ b/src/script/api/game/game_tile.hpp.sq @@ -66,6 +66,10 @@ void SQGSTile_Register(Squirrel *engine) SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROCKY, "BT_CLEAR_ROCKY"); SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_FIELDS, "BT_CLEAR_FIELDS"); SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_HOUSE, "BT_CLEAR_HOUSE"); + SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_NORMAL, "TERRAIN_NORMAL"); + SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_DESERT, "TERRAIN_DESERT"); + SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST"); + SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW"); ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); @@ -90,6 +94,7 @@ void SQGSTile_Register(Squirrel *engine) SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsRoughTile, "IsRoughTile", 2, ".i"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsSnowTile, "IsSnowTile", 2, ".i"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsDesertTile, "IsDesertTile", 2, ".i"); + SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetTerrainType, "GetTerrainType", 2, ".i"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetSlope, "GetSlope", 2, ".i"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetComplementSlope, "GetComplementSlope", 2, ".i"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetMinHeight, "GetMinHeight", 2, ".i"); |