Hide polyrail auto-terraform mode behind a setting for now
This commit is contained in:
@@ -5972,3 +5972,5 @@ CM_STR_NETWORK_SERVER_LIST_FILTER_REDDIT :
|
||||
CM_STR_NETWORK_SERVER_LIST_FILTER_TEAMGAME :{BLACK}TeamGame
|
||||
CM_STR_NETWORK_SERVER_LIST_FILTER_TOOLTIP :{BLACK}Filter this community
|
||||
|
||||
CM_STR_CONFIG_SETTING_ENABLE_POLYRAIL_TERRAFORM :Enable experimental auto-terraforming with polyrail
|
||||
CM_STR_CONFIG_SETTING_ENABLE_POLYRAIL_TERRAFORM_HELPTEXT :Allows to use experimental auto-terraforming mode with polyrail tool (by pressing Fn modifier).
|
||||
@@ -1080,7 +1080,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
|
||||
EventState CM_OnFnModStateChange() override
|
||||
{
|
||||
if (this->IsWidgetLowered(WID_RAT_POLYRAIL)) {
|
||||
if (_settings_client.gui.cm_enable_polyrail_terraform && this->IsWidgetLowered(WID_RAT_POLYRAIL)) {
|
||||
return ES_HANDLED;
|
||||
}
|
||||
return ES_NOT_HANDLED;
|
||||
|
||||
@@ -1655,6 +1655,7 @@ static SettingsContainer &GetSettingsTree()
|
||||
construction->Add(new SettingEntry("gui.quick_goto"));
|
||||
construction->Add(new SettingEntry("gui.default_rail_type"));
|
||||
construction->Add(new SettingEntry("gui.cm_use_improved_station_join"));
|
||||
construction->Add(new SettingEntry("gui.cm_enable_polyrail_terraform"));
|
||||
}
|
||||
|
||||
interface->Add(new SettingEntry("gui.fast_forward_speed_limit"));
|
||||
|
||||
@@ -223,7 +223,7 @@ struct GUISettings {
|
||||
bool cm_show_apm;
|
||||
uint8 cm_graph_background;
|
||||
bool cm_show_client_overlay;
|
||||
|
||||
bool cm_enable_polyrail_terraform;
|
||||
/**
|
||||
* Returns true when the user has sufficient privileges to edit newgrfs on a running game
|
||||
* @return whether the user has sufficient privileges to edit newgrfs in an existing game
|
||||
|
||||
@@ -262,3 +262,10 @@ var = gui.cm_show_client_overlay
|
||||
def = false
|
||||
cat = SC_BASIC
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.cm_enable_polyrail_terraform
|
||||
def = false
|
||||
str = CM_STR_CONFIG_SETTING_ENABLE_POLYRAIL_TERRAFORM
|
||||
strhelp = CM_STR_CONFIG_SETTING_ENABLE_POLYRAIL_TERRAFORM_HELPTEXT
|
||||
cat = SC_EXPERT
|
||||
|
||||
@@ -2695,7 +2695,7 @@ void UpdateTileSelection()
|
||||
_thd.new_size.y = y2 - y1 + TILE_SIZE;
|
||||
}
|
||||
}
|
||||
_thd.cm_new_poly_terra = citymania::_fn_mod;
|
||||
_thd.cm_new_poly_terra = _settings_client.gui.cm_enable_polyrail_terraform && citymania::_fn_mod;
|
||||
break;
|
||||
}
|
||||
/* HT_RAIL */
|
||||
|
||||
Reference in New Issue
Block a user