(svn r6544) - Codechange: Rename CmdReplaceVehicle to CmdSetAutoReplace, to reflect what it does.

This commit is contained in:
peter1138 2006-09-28 07:02:55 +00:00
parent a94936031b
commit f469d3fe76
6 changed files with 13 additions and 13 deletions

View File

@ -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 */

View File

@ -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,

View File

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

View File

@ -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) {

View File

@ -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 */

View File

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