summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-07-11 16:32:30 +0000
committermichi_cc <michi_cc@openttd.org>2011-07-11 16:32:30 +0000
commite5dd6f922799a5f741d5e040efcd689f0f5e875b (patch)
tree9946595186b4bfa0421c1c79a82386533322dc94 /src
parent624aec0b19ce6028ce595fd74b6872c731d0b06a (diff)
downloadopenttd-e5dd6f922799a5f741d5e040efcd689f0f5e875b.tar.xz
(svn r22658) -Feature: [NewGRF] Custom error messages for object callback 0x157.
Diffstat (limited to 'src')
-rw-r--r--src/object_cmd.cpp3
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);
}
}
}