(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 624aec0b19
commit e5dd6f9227

View File

@@ -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);
}
}
}