Import patch for random town road reconstruction.
From https://www.tt-forums.net/viewtopic.php?f=33&t=36438 Change scale from 0-100 to 0-1000 Adjust strings, settings GUI placement, etc.
This commit is contained in:
@@ -1722,6 +1722,8 @@ STR_CONFIG_SETTING_LARGER_TOWNS_VALUE :1 in {COMMA}
|
||||
STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :None
|
||||
STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Initial city size multiplier: {STRING2}
|
||||
STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Average size of cities relative to normal towns at start of the game
|
||||
STR_CONFIG_SETTING_RANDOM_ROAD_RECONSTRUCTION :Probability of random town road re-construction: {STRING2}
|
||||
STR_CONFIG_SETTING_RANDOM_ROAD_RECONSTRUCTION_HELPTEXT :The probability of town roads being randomly re-constructing (0 = off, 1000 = max)
|
||||
|
||||
STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :Update distribution graph every {STRING2}{NBSP}day{P 0:2 "" s}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :Time between subsequent recalculations of the link graph. Each recalculation calculates the plans for one component of the graph. That means that a value X for this setting does not mean the whole graph will be updated every X days. Only some component will. The shorter you set it the more CPU time will be necessary to calculate it. The longer you set it the longer it will take until the cargo distribution starts on new routes.
|
||||
|
@@ -1522,7 +1522,7 @@ static void TileLoop_Road(TileIndex tile)
|
||||
grp = GetTownRadiusGroup(t, tile);
|
||||
|
||||
/* Show an animation to indicate road work */
|
||||
if (t->road_build_months != 0 &&
|
||||
if ((t->road_build_months != 0 || Chance16(_settings_game.economy.random_road_reconstruction, 1000)) &&
|
||||
(DistanceManhattan(t->xy, tile) < 8 || grp != HZB_TOWN_EDGE) &&
|
||||
IsNormalRoad(tile) && !HasAtMostOneBit(GetAllRoadBits(tile))) {
|
||||
if (GetFoundationSlope(tile) == SLOPE_FLAT && EnsureNoVehicleOnGround(tile).Succeeded() && Chance16(1, 40)) {
|
||||
|
@@ -1766,6 +1766,7 @@ static SettingsContainer &GetSettingsTree()
|
||||
towns->Add(new SettingEntry("economy.allow_town_level_crossings"));
|
||||
towns->Add(new SettingEntry("economy.found_town"));
|
||||
towns->Add(new SettingEntry("economy.town_cargo_factor"));
|
||||
towns->Add(new SettingEntry("economy.random_road_reconstruction"));
|
||||
}
|
||||
|
||||
SettingsPage *industries = environment->Add(new SettingsPage(STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES));
|
||||
|
@@ -547,6 +547,7 @@ struct EconomySettings {
|
||||
int8 town_cargo_factor; ///< power-of-two multiplier for town (passenger, mail) generation. May be negative.
|
||||
bool infrastructure_maintenance; ///< enable monthly maintenance fee for owner infrastructure
|
||||
uint8 day_length_factor; ///< factor which the length of day is multiplied
|
||||
uint16 random_road_reconstruction; ///< chance out of 1000 per tile loop for towns to start random road re-construction
|
||||
};
|
||||
|
||||
struct LinkGraphSettings {
|
||||
|
@@ -2013,6 +2013,19 @@ strhelp = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT
|
||||
proc = InvalidateCompanyInfrastructureWindow
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
var = economy.random_road_reconstruction
|
||||
type = SLE_UINT16
|
||||
def = 0
|
||||
min = 0
|
||||
max = 1000
|
||||
str = STR_CONFIG_SETTING_RANDOM_ROAD_RECONSTRUCTION
|
||||
strhelp = STR_CONFIG_SETTING_RANDOM_ROAD_RECONSTRUCTION_HELPTEXT
|
||||
strval = STR_JUST_COMMA
|
||||
cat = SC_BASIC
|
||||
patxname = ""economy.random_road_reconstruction""
|
||||
|
||||
##
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
|
Reference in New Issue
Block a user