mirror of https://github.com/OpenTTD/OpenTTD
(svn r22658) -Feature: [NewGRF] Custom error messages for object callback 0x157.
parent
624aec0b19
commit
e5dd6f9227
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue