mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 17:49:10 +00:00
(svn r4706) - NewGRF: add the correct default error message for the wagon attach callback.
This commit is contained in:
@@ -2514,6 +2514,7 @@ STR_886F_TRANSFER :{BLACK}Transfer
|
|||||||
|
|
||||||
STR_TRAIN_STOPPING :{RED}Stopping
|
STR_TRAIN_STOPPING :{RED}Stopping
|
||||||
STR_TRAIN_STOPPING_VEL :{RED}Stopping, {VELOCITY}
|
STR_TRAIN_STOPPING_VEL :{RED}Stopping, {VELOCITY}
|
||||||
|
STR_INCOMPATIBLE_RAIL_TYPES :Incompatible rail types
|
||||||
|
|
||||||
##id 0x9000
|
##id 0x9000
|
||||||
STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Road vehicle in the way
|
STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Road vehicle in the way
|
||||||
|
@@ -1081,7 +1081,7 @@ int32 CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
/* Check NewGRF Callback 0x1D */
|
/* Check NewGRF Callback 0x1D */
|
||||||
uint16 callback = GetVehicleCallbackParent(CBID_TRAIN_ALLOW_WAGON_ATTACH, 0, 0, dst_head->engine_type, src, dst_head);
|
uint16 callback = GetVehicleCallbackParent(CBID_TRAIN_ALLOW_WAGON_ATTACH, 0, 0, dst_head->engine_type, src, dst_head);
|
||||||
if (callback != CALLBACK_FAILED) {
|
if (callback != CALLBACK_FAILED) {
|
||||||
if (callback == 0xFD) return CMD_ERROR;
|
if (callback == 0xFD) return_cmd_error(STR_INCOMPATIBLE_RAIL_TYPES);
|
||||||
if (callback < 0xFD) {
|
if (callback < 0xFD) {
|
||||||
StringID error = GetGRFStringID(GetEngineGRFID(dst_head->engine_type), 0xD000 + callback);
|
StringID error = GetGRFStringID(GetEngineGRFID(dst_head->engine_type), 0xD000 + callback);
|
||||||
return_cmd_error(error);
|
return_cmd_error(error);
|
||||||
|
Reference in New Issue
Block a user