diff options
author | peter1138 <peter1138@openttd.org> | 2006-09-28 07:02:55 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-09-28 07:02:55 +0000 |
commit | f469d3fe76f1a2384f3f4508e23677db37d8f0b7 (patch) | |
tree | a63f553b649fb31388f6f320469902d1aae5424b | |
parent | a94936031bc0ac504551251b50224e4b65a499a8 (diff) | |
download | openttd-f469d3fe76f1a2384f3f4508e23677db37d8f0b7.tar.xz |
(svn r6544) - Codechange: Rename CmdReplaceVehicle to CmdSetAutoReplace, to reflect what it does.
-rw-r--r-- | command.c | 4 | ||||
-rw-r--r-- | command.h | 2 | ||||
-rw-r--r-- | openttd.c | 4 | ||||
-rw-r--r-- | players.c | 4 | ||||
-rw-r--r-- | settings.c | 6 | ||||
-rw-r--r-- | vehicle_gui.c | 6 |
6 files changed, 13 insertions, 13 deletions
@@ -156,7 +156,7 @@ DEF_COMMAND(CmdRefitRailVehicle); DEF_COMMAND(CmdBuildSignalTrack); DEF_COMMAND(CmdRemoveSignalTrack); -DEF_COMMAND(CmdReplaceVehicle); +DEF_COMMAND(CmdSetAutoReplace); DEF_COMMAND(CmdCloneVehicle); DEF_COMMAND(CmdMassStartStopVehicle); @@ -303,7 +303,7 @@ static const Command _command_proc_table[] = { {NULL, 0}, /* 112 */ {CmdGiveMoney, 0}, /* 113 */ {CmdChangePatchSetting, CMD_SERVER}, /* 114 */ - {CmdReplaceVehicle, 0}, /* 115 */ + {CmdSetAutoReplace, 0}, /* 115 */ {CmdCloneVehicle, 0}, /* 116 */ {CmdMassStartStopVehicle, 0}, /* 117 */ {CmdDepotSellAllVehicles, 0}, /* 118 */ @@ -133,7 +133,7 @@ enum { CMD_GIVE_MONEY = 113, CMD_CHANGE_PATCH_SETTING = 114, - CMD_REPLACE_VEHICLE = 115, + CMD_SET_AUTOREPLACE = 115, CMD_CLONE_VEHICLE = 116, CMD_MASS_START_STOP = 117, @@ -606,7 +606,7 @@ static void MakeNewGameDone(void) _local_player = 0; _current_player = _local_player; - DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE); MarkWholeScreenDirty(); } @@ -681,7 +681,7 @@ static void StartScenario(void) _local_player = 0; _current_player = _local_player; - DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE); MarkWholeScreenDirty(); } @@ -700,7 +700,7 @@ static void DeletePlayerStuff(PlayerID pi) * if p1 = 5, then * - p2 = enable renew_keep_length */ -int32 CmdReplaceVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) +int32 CmdSetAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { Player *p; if (!(_current_player < MAX_PLAYERS)) @@ -869,7 +869,7 @@ int32 CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) MarkWholeScreenDirty(); } } else if (p->index == _local_player) { - DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE); } #ifdef ENABLE_NETWORK if (_network_server) { diff --git a/settings.c b/settings.c index 98dd32036..0b77381cb 100644 --- a/settings.c +++ b/settings.c @@ -1123,19 +1123,19 @@ static int32 CheckInterval(int32 p1) static int32 EngineRenewUpdate(int32 p1) { - DoCommandP(0, 0, _patches.autorenew, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, 0, _patches.autorenew, NULL, CMD_SET_AUTOREPLACE); return 0; } static int32 EngineRenewMonthsUpdate(int32 p1) { - DoCommandP(0, 1, _patches.autorenew_months, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, 1, _patches.autorenew_months, NULL, CMD_SET_AUTOREPLACE); return 0; } static int32 EngineRenewMoneyUpdate(int32 p1) { - DoCommandP(0, 2, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, 2, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE); return 0; } /* End - Callback Functions */ diff --git a/vehicle_gui.c b/vehicle_gui.c index 21b7531cc..93b003388 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -989,19 +989,19 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) break; case 17: /* toggle renew_keep_length */ - DoCommandP(0, 5, GetPlayer(_local_player)->renew_keep_length ? 0 : 1, NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, 5, GetPlayer(_local_player)->renew_keep_length ? 0 : 1, NULL, CMD_SET_AUTOREPLACE); break; case 4: { /* Start replacing */ EngineID veh_from = WP(w, replaceveh_d).sel_engine[0]; EngineID veh_to = WP(w, replaceveh_d).sel_engine[1]; - DoCommandP(0, 3, veh_from + (veh_to << 16), NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, 3, veh_from + (veh_to << 16), NULL, CMD_SET_AUTOREPLACE); break; } case 6: { /* Stop replacing */ EngineID veh_from = WP(w, replaceveh_d).sel_engine[0]; - DoCommandP(0, 3, veh_from + (INVALID_ENGINE << 16), NULL, CMD_REPLACE_VEHICLE); + DoCommandP(0, 3, veh_from + (INVALID_ENGINE << 16), NULL, CMD_SET_AUTOREPLACE); break; } |