Add passworded mechanism to change server game settings from client

This commit is contained in:
Jonathan G Rennison
2019-08-20 20:42:17 +01:00
parent 17c054a650
commit ec892879f4
17 changed files with 155 additions and 16 deletions

View File

@@ -1093,9 +1093,6 @@ struct BuildVehicleWindow : Window {
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;
@@ -1564,6 +1561,9 @@ struct BuildVehicleWindow : Window {
this->SetWidgetsDisabledState(this->sel_engine == INVALID_ENGINE, WID_BV_SHOW_HIDE, WID_BV_BUILD, WID_BV_RENAME, WIDGET_LIST_END);
/* disable renaming engines in network games if you are not the server */
this->SetWidgetDisabledState(WID_BV_RENAME, _networking && !(_network_server || _network_settings_access));
this->DrawWidgets();
if (!this->IsShaded()) {