Initial implementation of tracerestrict counter mechanism

This commit is contained in:
Jonathan G Rennison
2020-08-31 19:08:35 +01:00
parent dea2be5d3f
commit 817bc44a3e
17 changed files with 887 additions and 13 deletions

View File

@@ -367,6 +367,7 @@ DropDownList BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplac
}
if (this->vli.vtype == VEH_TRAIN && _settings_client.gui.show_adv_tracerestrict_features) {
list.emplace_back(new DropDownListStringItem(STR_TRACE_RESTRICT_SLOT_MANAGE, ADI_TRACERESTRICT_SLOT_MGMT, false));
list.emplace_back(new DropDownListStringItem(STR_TRACE_RESTRICT_COUNTER_MANAGE, ADI_TRACERESTRICT_COUNTER_MGMT, false));
}
if (change_order_str != 0) {
list.emplace_back(new DropDownListStringItem(change_order_str, ADI_CHANGE_ORDER, disable));
@@ -2115,6 +2116,12 @@ public:
break;
}
case ADI_TRACERESTRICT_COUNTER_MGMT: {
extern void ShowTraceRestrictCounterWindow(CompanyID company);
ShowTraceRestrictCounterWindow(this->owner);
break;
}
default: NOT_REACHED();
}
break;