Mercurial > hg > openttd
changeset 17862:ec8e61ea1b41 draft
(svn r22658) -Feature: [NewGRF] Custom error messages for object callback 0x157.
author | michi_cc <michi_cc@openttd.org> |
---|---|
date | Mon, 11 Jul 2011 16:32:30 +0000 |
parents | 7f2e98164c7e |
children | a289b7952660 |
files | src/object_cmd.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -240,7 +240,8 @@ 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); } } }