(svn r22658) -Feature: [NewGRF] Custom error messages for object callback 0x157.

This commit is contained in:
michi_cc
2011-07-11 16:32:30 +00:00
parent 05418feb8a
commit cf2bfa91a4

View File

@@ -240,7 +240,8 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
if (callback == CALLBACK_FAILED) { if (callback == CALLBACK_FAILED) {
cost.AddCost(CheckBuildableTile(t, 0, allowed_z, false)); cost.AddCost(CheckBuildableTile(t, 0, allowed_z, false));
} else if (callback != 0) { } 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);
} }
} }
} }