diff options
author | glx <glx@openttd.org> | 2019-10-26 00:48:13 +0200 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-12-17 21:35:07 +0000 |
commit | e001d875693395de6c15e64e0d05e0d94089813e (patch) | |
tree | a1067d32a6cd1b5b7e4dcbcc264cf9fc379cbf66 /src/script/api/ai/ai_tile.hpp.sq | |
parent | 94cc0edb70f3bec44c2928274631c6a8804d1478 (diff) | |
download | openttd-e001d875693395de6c15e64e0d05e0d94089813e.tar.xz |
Add #7801: [Script] more error mappings
Diffstat (limited to 'src/script/api/ai/ai_tile.hpp.sq')
-rw-r--r-- | src/script/api/ai/ai_tile.hpp.sq | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/script/api/ai/ai_tile.hpp.sq b/src/script/api/ai/ai_tile.hpp.sq index d5309ec5e..4d4f0fe37 100644 --- a/src/script/api/ai/ai_tile.hpp.sq +++ b/src/script/api/ai/ai_tile.hpp.sq @@ -24,6 +24,7 @@ void SQAITile_Register(Squirrel *engine) SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); SQAITile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); SQAITile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); + SQAITile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); SQAITile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W"); SQAITile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S"); SQAITile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E"); @@ -69,15 +70,19 @@ void SQAITile_Register(Squirrel *engine) SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST"); SQAITile.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); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); + 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); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); + ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); + ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); + ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); + ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i"); SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii"); |