diff options
author | michi_cc <michi_cc@openttd.org> | 2011-07-11 16:32:30 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-07-11 16:32:30 +0000 |
commit | e5dd6f922799a5f741d5e040efcd689f0f5e875b (patch) | |
tree | 9946595186b4bfa0421c1c79a82386533322dc94 /src/object_cmd.cpp | |
parent | 624aec0b19ce6028ce595fd74b6872c731d0b06a (diff) | |
download | openttd-e5dd6f922799a5f741d5e040efcd689f0f5e875b.tar.xz |
(svn r22658) -Feature: [NewGRF] Custom error messages for object callback 0x157.
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r-- | src/object_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 9fc5b8ee0..17a053b3d 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -240,7 +240,8 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 if (callback == CALLBACK_FAILED) { cost.AddCost(CheckBuildableTile(t, 0, allowed_z, false)); } else if (callback != 0) { - return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); + /* The meaning of bit 10 is inverted in the result of this callback. */ + return GetErrorMessageFromLocationCallbackResult(ToggleBit(callback, 10), spec->grf_prop.grffile->grfid, STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); } } } |