Index: src/ai/api/ai_tile.hpp =================================================================== --- src/ai/api/ai_tile.hpp (revision 12187) +++ src/ai/api/ai_tile.hpp (working copy) @@ -118,7 +118,7 @@ * @param slope corners to raise (SLOPE_xxx). * @return 0 means failed, 1 means success. */ - bool RaiseTile(TileIndex tile, int32 slope); + static bool RaiseTile(TileIndex tile, int32 slope); /** * Lower the given corners of the tile. The corners can be combined, @@ -128,7 +128,7 @@ * @param slope corners to lower (SLOPE_xxx). * @return 0 means failed, 1 means success. */ - bool LowerTile(TileIndex tile, int32 slope); + static bool LowerTile(TileIndex tile, int32 slope); }; Index: src/ai/api/ai_tile.cpp =================================================================== --- src/ai/api/ai_tile.cpp (revision 12187) +++ src/ai/api/ai_tile.cpp (working copy) @@ -10,7 +10,7 @@ #include "../../command_type.h" #include "../../settings_type.h" -bool AITile::IsBuildable(TileIndex tile) +/* static */ bool AITile::IsBuildable(TileIndex tile) { /* Outside of the map */ if (tile >= ::MapSize()) return false; @@ -26,7 +26,7 @@ } } -bool AITile::IsWater(TileIndex tile) +/* static */ bool AITile::IsWater(TileIndex tile) { /* Outside of the map */ if (tile >= ::MapSize()) return false; @@ -34,7 +34,7 @@ return ::GetTileType(tile) == MP_WATER; } -int32 AITile::GetSlope(TileIndex tile) +/* static */ int32 AITile::GetSlope(TileIndex tile) { /* Outside of the map */ if (tile >= ::MapSize()) return 0; @@ -42,7 +42,7 @@ return ::GetTileSlope(tile, NULL); } -int32 AITile::GetHeight(TileIndex tile) +/* static */ int32 AITile::GetHeight(TileIndex tile) { /* Outside of the map */ if (tile >= ::MapSize()) return 0; @@ -50,7 +50,7 @@ return ::TileHeight(tile); } -int32 AITile::GetCargoAcceptance(TileIndex tile, CargoID cargo_type, uint width, uint height, uint rad) +/* static */ int32 AITile::GetCargoAcceptance(TileIndex tile, CargoID cargo_type, uint width, uint height, uint rad) { /* Outside of the map */ if (tile >= ::MapSize()) return 0; @@ -60,7 +60,7 @@ return accepts[cargo_type]; } -int32 AITile::GetCargoProduction(TileIndex tile, CargoID cargo_type, uint width, uint height, uint rad) +/* static */ int32 AITile::GetCargoProduction(TileIndex tile, CargoID cargo_type, uint width, uint height, uint rad) { /* Outside of the map */ if (tile >= ::MapSize()) return 0; @@ -70,18 +70,18 @@ return produced[cargo_type]; } -bool AITile::RaiseTile(TileIndex tile, int32 slope) +/* static */ bool AITile::RaiseTile(TileIndex tile, int32 slope) { /* Outside of the map */ if (tile >= ::MapSize()) return false; - return this->DoCommand(tile, slope, 1, CMD_TERRAFORM_LAND); + return DoCommand(tile, slope, 1, CMD_TERRAFORM_LAND); } -bool AITile::LowerTile(TileIndex tile, int32 slope) +/* static */ bool AITile::LowerTile(TileIndex tile, int32 slope) { /* Outside of the map */ if (tile >= ::MapSize()) return false; - return this->DoCommand(tile, slope, 0, CMD_TERRAFORM_LAND); + return DoCommand(tile, slope, 0, CMD_TERRAFORM_LAND); } Index: src/ai/api/ai_tile.hpp.sq =================================================================== --- src/ai/api/ai_tile.hpp.sq (revision 12187) +++ src/ai/api/ai_tile.hpp.sq (working copy) @@ -47,9 +47,8 @@ SQAITile.DefSQStaticMethod(engine, &AITile::GetHeight, "GetHeight", 2, "xi"); SQAITile.DefSQStaticMethod(engine, &AITile::GetCargoAcceptance, "GetCargoAcceptance", 6, "xiiiii"); SQAITile.DefSQStaticMethod(engine, &AITile::GetCargoProduction, "GetCargoProduction", 6, "xiiiii"); + SQAITile.DefSQStaticMethod(engine, &AITile::RaiseTile, "RaiseTile", 3, "xii"); + SQAITile.DefSQStaticMethod(engine, &AITile::LowerTile, "LowerTile", 3, "xii"); - SQAITile.DefSQMethod(engine, &AITile::RaiseTile, "RaiseTile", 3, "xii"); - SQAITile.DefSQMethod(engine, &AITile::LowerTile, "LowerTile", 3, "xii"); - SQAITile.PostRegister(engine); }