Changeset - r20381:50067c48470c
[Not reviewed]
master
0 2 0
frosch - 11 years ago 2013-06-11 18:24:01
frosch@openttd.org
(svn r25394) -Fix: Restrict renaming engines to the server, just like renaming towns.
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -13,6 +13,7 @@
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "station_base.h"
 
#include "network/network.h"
 
#include "articulated_vehicles.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
@@ -971,6 +972,9 @@ struct BuildVehicleWindow : Window {
 
		 * So we just hide it, and enlarge the Rename button by the now vacant place. */
 
		if (this->listview_mode) this->GetWidget<NWidgetStacked>(WID_BV_BUILD_SEL)->SetDisplayedPlane(SZSP_NONE);
 

	
 
		/* disable renaming engines in network games if you are not the server */
 
		this->SetWidgetDisabledState(WID_BV_RENAME, _networking && !_network_server);
 

	
 
		NWidgetCore *widget = this->GetWidget<NWidgetCore>(WID_BV_LIST);
 
		widget->tool_tip = STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP + type;
 

	
src/command.cpp
Show inline comments
 
@@ -261,7 +261,7 @@ static const Command _command_proc_table
 
	DEF_CMD(CmdWantEnginePreview,                              0, CMDT_VEHICLE_MANAGEMENT    ), // CMD_WANT_ENGINE_PREVIEW
 

	
 
	DEF_CMD(CmdRenameVehicle,                       CMD_STR_CTRL, CMDT_OTHER_MANAGEMENT      ), // CMD_RENAME_VEHICLE
 
	DEF_CMD(CmdRenameEngine,                        CMD_STR_CTRL, CMDT_OTHER_MANAGEMENT      ), // CMD_RENAME_ENGINE
 
	DEF_CMD(CmdRenameEngine,           CMD_STR_CTRL | CMD_SERVER, CMDT_OTHER_MANAGEMENT      ), // CMD_RENAME_ENGINE
 

	
 
	DEF_CMD(CmdRenameCompany,                       CMD_STR_CTRL, CMDT_OTHER_MANAGEMENT      ), // CMD_RENAME_COMPANY
 
	DEF_CMD(CmdRenamePresident,                     CMD_STR_CTRL, CMDT_OTHER_MANAGEMENT      ), // CMD_RENAME_PRESIDENT
0 comments (0 inline, 0 general)