Custom bridge heads: Add savegame version and setting.
This commit is contained in:
@@ -1701,6 +1701,9 @@ STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT :Path finder to
|
||||
STR_CONFIG_SETTING_REVERSE_AT_SIGNALS :Automatic reversing at signals: {STRING2}
|
||||
STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Allow trains to reverse on a signal, if they waited there a long time
|
||||
|
||||
STR_CONFIG_SETTING_ENABLE_ROAD_CUSTOM_BRIDGE_HEADS :Enable road custom bridge heads: {STRING2}
|
||||
STR_CONFIG_SETTING_ENABLE_ROAD_CUSTOM_BRIDGE_HEADS_HELPTEXT :Allow road bridges to have custom, non-straight flat entry/exit tiles
|
||||
|
||||
STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Change setting value
|
||||
|
||||
# Config errors
|
||||
|
@@ -2968,6 +2968,14 @@ bool AfterLoadGame()
|
||||
#endif
|
||||
}
|
||||
|
||||
if (SlXvIsFeatureMissing(XSLFI_CUSTOM_BRIDGE_HEADS)) {
|
||||
/* ensure that previously unused custom bridge-head bits are cleared */
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (IsBridgeTile(t) && GetTunnelBridgeTransportType(t) == TRANSPORT_ROAD) {
|
||||
SB(_m[t].m2, 0, 8, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Station acceptance is some kind of cache */
|
||||
if (IsSavegameVersionBefore(127)) {
|
||||
|
@@ -45,6 +45,7 @@ std::vector<uint32> _sl_xv_discardable_chunk_ids; ///< list of chunks
|
||||
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
|
||||
|
||||
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_CUSTOM_BRIDGE_HEADS, XSCF_NULL, 1, 1, "custom_bridge_heads", NULL, NULL, NULL },
|
||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
|
||||
};
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
enum SlXvFeatureIndex {
|
||||
XSLFI_NULL = 0, ///< Unused value, to indicate that no extended feature test is in use
|
||||
XSLFI_CUSTOM_BRIDGE_HEADS, ///< Custom bridge heads
|
||||
|
||||
XSLFI_SIZE, ///< Total count of features, including null feature
|
||||
};
|
||||
|
@@ -1649,6 +1649,7 @@ static SettingsContainer &GetSettingsTree()
|
||||
limitations->Add(new SettingEntry("construction.road_stop_on_town_road"));
|
||||
limitations->Add(new SettingEntry("construction.road_stop_on_competitor_road"));
|
||||
limitations->Add(new SettingEntry("vehicle.disable_elrails"));
|
||||
limitations->Add(new SettingEntry("construction.road_custom_bridge_heads"));
|
||||
}
|
||||
|
||||
SettingsPage *disasters = main->Add(new SettingsPage(STR_CONFIG_SETTING_ACCIDENTS));
|
||||
|
@@ -311,6 +311,7 @@ struct ConstructionSettings {
|
||||
bool freeform_edges; ///< allow terraforming the tiles at the map edges
|
||||
uint8 extra_tree_placement; ///< (dis)allow building extra trees in-game
|
||||
uint8 command_pause_level; ///< level/amount of commands that can't be executed while paused
|
||||
uint8 road_custom_bridge_heads; ///< allow construction of road custom bridge heads
|
||||
|
||||
uint32 terraform_per_64k_frames; ///< how many tile heights may, over a long period, be terraformed per 65536 frames?
|
||||
uint16 terraform_frame_burst; ///< how many tile heights may, over a short period, be terraformed?
|
||||
|
@@ -1229,6 +1229,15 @@ str = STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD
|
||||
strhelp = STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_BOOL]
|
||||
base = GameSettings
|
||||
var = construction.road_custom_bridge_heads
|
||||
def = true
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_ENABLE_ROAD_CUSTOM_BRIDGE_HEADS
|
||||
strhelp = STR_CONFIG_SETTING_ENABLE_ROAD_CUSTOM_BRIDGE_HEADS_HELPTEXT
|
||||
patxname = ""custom_bridge_heads.construction.road_custom_bridge_heads""
|
||||
|
||||
[SDT_BOOL]
|
||||
base = GameSettings
|
||||
var = station.adjacent_stations
|
||||
|
Reference in New Issue
Block a user