OpenTTD Source: GameSettings Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
GameSettings Struct Reference

All settings together for the game. More...

`#include <settings_type.h>`

## Data Fields
DifficultySettings | difficulty
| settings related to the difficulty
GameCreationSettings | game_creation
| settings used during the creation of a game (map)
ConstructionSettings | construction
| construction of things in-game
AISettings | ai
| what may the AI do?
ScriptSettings | script
| settings for scripts
ScriptConfigSettings | script_config
| AI and Gamescript configuration.
PathfinderSettings | pf
| settings for all pathfinders
OrderSettings | order
| settings related to orders
VehicleSettings | vehicle
| options for vehicles
EconomySettings | economy
| settings to change the economy
LinkGraphSettings | linkgraph
| settings for link graph calculations
StationSettings | station
| settings related to station management
LocaleSettings | locale
| settings related to used currency/unit system in the current game

## Detailed Description

All settings together for the game.

Definition at line 632 of file settings_type.h.

## Field Documentation

## ◆ ai

AISettings GameSettings::ai

what may the AI do?

Definition at line 636 of file settings_type.h.

Referenced by AI::CanStartNew(), AI::GameLoop(), IsVehicleTypeDisabled(), and AIConfigWindow::OnClick().

## ◆ construction

ConstructionSettings GameSettings::construction

construction of things in-game

Definition at line 635 of file settings_type.h.

Referenced by _GenerateWorld(), AfterLoadGame(), AutoslopeEnabled(), BuildLandLegend(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckBridgeAvailability(), CheckBuildableTile(), CheckFlatLandRoadStop(), CheckIfCanLevelIndustryPlatform(), CheckRailSlope(), CheckRoadSlope(), ClickChangeMaxHlCheat(), CmdBuildBridge(), CmdBuildIndustry(), CmdBuildLock(), CmdBuildObject(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildSingleRail(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdLevelLand(), CmdTerraformLand(), Company::Company(), DistanceFromEdgeDir(), SmallMapWindow::DrawSmallMapColumn(), FixSlopes(), FlatEmptyWorld(), GenerateLandscape(), GenerateTerrainPerlin(), GenerateWorld(), GetClosestWaterDistance(), IndustrySpec::GetConstructionCost(), GetGlobalVariable(), GetMapHeightLimit(), GetOtherAqueductEnd(), BuildIndustryWindow::GetWidgetString(), GlobalVarChangeInfo(), GreyscaleToMapHeights(), GrowTownInTile(), GUIPlaceProcDragXY(), HeightMapNormalize(), InitializePatchFlags(), InverseRemapCoords2(), IsCommandAllowedWhilePaused(), IsInnerTile(), IsRoadAllowedHere(), IsValidTileForWaypoint(), LoadHeightmap(), BuildIndustryWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), GenerateLandscapeWindow::OnInvalidateData(), BuildObjectWindow::OnPlaceMouseUp(), TerraformToolbarWindow::OnPlaceMouseUp(), PlaceTreesRandomly(), SmallMapWindow::RebuildColourIndexIfNecessary(), RemoveRoad(), SetupScreenshotViewport(), TerraformTileHeight(), TestAutoslopeOnRailTile(), TGPGetMaxHeight(), TileAddWrap(), UpdateLandscapingLimits(), and ViewportAddLandscape().

## ◆ difficulty

DifficultySettings GameSettings::difficulty

settings related to the difficulty

Definition at line 633 of file settings_type.h.

Referenced by AfterLoadGame(), Subsidy::AwardTo(), CheckCompanyHasMoney(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), ClearTile_Town(), CmdBuildAirport(), CompanyCheckBankrupt(), CreateSubsidy(), DeliverGoods(), AIConfigWindow::DrawWidget(), StatusBarWindow::DrawWidget(), IndustryBuildData::EconomyMonthlyLoop(), AI::GameLoop(), GenerateIndustries(), GenerateLandscape(), GenerateTowns(), GetAirportNoiseLevelForDistance(), GetAvailableMoney(), GetDefaultTownsForMapSize(), GetIndustryGamePlayProbability(), GetNumberOfIndustries(), GetScaledIndustryGenerationProbability(), CompanyFinancesWindow::GetWidgetString(), GenerateLandscapeWindow::GetWidgetString(), HeightMapNormalize(), Town::MaxTownNoise(), Vehicle::NeedsServicing(), GenerateLandscapeWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), GenerateLandscapeWindow::OnInvalidateData(), OnTick_Companies(), RecomputePrices(), TGPGetMaxHeight(), ValidateSettings(), and VehicleServiceInDepot().

## ◆ economy

EconomySettings GameSettings::economy

settings to change the economy

Definition at line 642 of file settings_type.h.

Referenced by _GenerateWorld(), AfterLoadGame(), CanRoadContinueIntoNextTile(), ChangeIndustryProduction(), ChangeMinutesPerYear(), ChangeTimekeepingUnits(), CheckIfAuthorityAllowsNewStation(), CmdBuildAirport(), CmdConvertRoad(), CmdFoundTown(), CmdGiveMoney(), CmdPlaceHouse(), CmdPlantTree(), CompaniesGenStatistics(), DoCreateTown(), CompanyInfrastructureWindow::DrawWidget(), TownViewWindow::DrawWidget(), FindTownForIndustry(), GenerateTowns(), TownViewWindow::GetDesiredInfoHeight(), TownAuthorityWindow::GetEnabledActions(), GetMaskOfTownActions(), GetNormalGrowthRate(), TownScopeResolver::GetVariable(), GrowTownInTile(), HighlightTownLocalAuthorityTiles(), InitializePatchFlags(), LoadTownData(), Town::MaxTownNoise(), MenuClickTown(), FoundTownWindow::OnClick(), LandInfoWindow::OnInit(), FoundTownWindow::OnInit(), BuildAirportWindow::OnPaint(), CompanyWindow::OnPaint(), CargoPayment::PayTransfer(), RemoveAirport(), ScaleByCargoScale(), ScaleByInverseCargoScale(), TileLoop_Town(), TownActionBuyRights(), TownActionFundBuildings(), TownActionRoadRebuild(), TownTickHandler(), UpdateTownGrowth(), CompanyInfrastructureWindow::UpdateWidgetSize(), IndustrySpec::UsesOriginalEconomy(), and TimerGameEconomy::UsingWallclockUnits().

## ◆ game_creation

GameCreationSettings GameSettings::game_creation

settings used during the creation of a game (map)

Definition at line 634 of file settings_type.h.

Referenced by _GenerateWorld(), AddAcceptedCargoOfHouse(), AfterLoadGame(), AfterNewGRFScan::AfterNewGRFScan(), CalculateDesertLine(), CalculateRefitMasks(), CalculateSnowLine(), ChangeIndustryProduction(), CheckIfIndustryTileSlopes(), CheckIndustryCloseDownProtection(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), CheckNewIndustry_OilRefinery(), CheckNewIndustry_OilRig(), CmdFoundTown(), CmdPlantTree(), CreateNewIndustryHelper(), CreateRivers(), DoCreateTown(), DrawRoadAsSnowOrDesert(), FinaliseEngineArray(), FindSpring(), GenerateLandscape(), GenerateStationName(), GenerateTownName(), GenerateTrees(), GenerateWorld(), GetAmplitude(), GetClimateMaskForLandscape(), GetCompanyRailTypes(), GetCompanyRoadTypes(), GetDefaultTownsForMapSize(), GetGlobalVariable(), GetIndustryGamePlayProbability(), GetMaxTreeSpriteSize(), GetNumberOfIndustries(), GetRailTypes(), GetRandomTreeType(), GetRoadTypes(), GetScaledIndustryGenerationProbability(), GetSmallMapVegetationPixels(), GetSnowLine(), GetTerrainType(), GenerateLandscapeWindow::GetWidgetString(), CreateScenarioWindow::GetWidgetString(), ScenarioEditorToolbarWindow::GetWidgetString(), GfxLoadSprites(), GreyscaleToMapHeights(), Vehicle::HandleBreakdown(), HeightMapCoastLines(), HeightMapNormalize(), HeightMapSineTransform(), HighestSnowLine(), IndustriesChangeInfo(), int_noise(), Engine::IsEnabled(), ObjectSpec::IsEverAvailable(), IsValidRiverTerminusTile(), LoadNewGRF(), LoadSpriteTables(), LoadTownData(), LowestSnowLine(), MakeTreeTypeButtons(), MakeWetlands(), Gamelog::Mode(), NetworkRestartMap(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), CreateScenarioWindow::OnDropdownSelect(), GenerateLandscapeWindow::OnInvalidateData(), AfterNewGRFScan::OnNewGRFsScanned(), CreateScenarioWindow::OnPaint(), ScenarioEditorToolbarWindow::OnPaint(), GenerateLandscapeWindow::OnQueryTextFinished(), CreateScenarioWindow::OnQueryTextFinished(), PlaceTreesRandomly(), ResetIndustries(), ResetNewGRFData(), ServerNetworkAdminSocketHandler::SendWelcome(), SetNewLandscapeType(), SetStartingYear(), SetYearEngineAgingStops(), SplitGroundSpriteForOverlay(), StartNewGameWithoutGUI(), StartupOneEngine(), StateGameLoop(), Gamelog::TestMode(), TGPGetMaxHeight(), ToolbarScenDatePanel(), TownHouseChangeInfo(), TryBuildTownHouse(), TryMakeRiverTerminus(), and ValidateSettings().

## ◆ linkgraph

LinkGraphSettings GameSettings::linkgraph

settings for link graph calculations

Definition at line 643 of file settings_type.h.

Referenced by AfterLoadGame(), DeleteStaleLinks(), StationViewWindow::DrawEntries(), FindSubsidyIndustryCargoRoute(), FindSubsidyTownCargoRoute(), LoadFromConfig(), OnTick_LinkGraph(), StationViewWindow::ShowCargo(), StateGameLoop_LinkGraphPauseControl(), and LinkGraphJob::~LinkGraphJob().

## ◆ locale

LocaleSettings GameSettings::locale

settings related to used currency/unit system in the current game

Definition at line 645 of file settings_type.h.

Referenced by AfterLoadGame(), GameOptionsWindow::BuildDropDownList(), FormatString(), GetCurrency(), GetVelocityUnits(), GameOptionsWindow::GetWidgetString(), and GameOptionsWindow::OnDropdownSelect().

## ◆ order

OrderSettings GameSettings::order

settings related to orders

Definition at line 640 of file settings_type.h.

Referenced by AircraftEventHandler_AtTerminal(), GetLoadAmount(), InitializePatchFlags(), LoadUnloadVehicle(), Vehicle::NeedsServicing(), UpdateLoadUnloadTicks(), and UpdateStationRating().

## ◆ pf

PathfinderSettings GameSettings::pf

settings for all pathfinders

Definition at line 639 of file settings_type.h.

Referenced by AfterLoadGame(), CheckIfTrainNeedsService(), CheckNextTrainTile(), CheckTrainStayInDepot(), CmdBuildSingleSignal(), ExtendTrainReservation(), FollowTrainReservation(), CYapfCostRailT< Types >::PfCalcCost(), ReverseTrainDirection(), RoadFindPathToDest(), TrainController(), YapfTrainCheckReverse(), YapfTrainChooseTrack(), YapfTrainFindNearestDepot(), and YapfTrainFindNearestSafeTile().

## ◆ script

ScriptSettings GameSettings::script

settings for scripts

Definition at line 637 of file settings_type.h.

Referenced by ScriptInstance::GameLoop(), and ScriptInstance::Pause().

## ◆ script_config

ScriptConfigSettings GameSettings::script_config

AI and Gamescript configuration.

Definition at line 638 of file settings_type.h.

Referenced by AIConfig::GetConfig(), GameConfig::GetConfig(), AI::ResetConfig(), AI::Uninitialize(), and Game::Uninitialize().

## ◆ station

StationSettings GameSettings::station

settings related to station management

Definition at line 644 of file settings_type.h.

Referenced by AfterLoadGame(), BuildRailClick_Remove(), CanExpandRailStation(), CmdBuildAirport(), CmdBuildDock(), CmdBuildRailStation(), CmdBuildRailWaypoint(), CmdBuildRoadStop(), CmdBuildRoadWaypoint(), FindStationsNearby(), ForAllStationsAroundTiles(), GetAcceptanceAroundTiles(), Station::GetCatchmentRadius(), GetProductionAroundTiles(), GetTileCatchmentRadius(), InitializePatchFlags(), AirportSpec::IsAvailable(), BuildAirportWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), PlaceRail_Station(), PlaceRail_Waypoint(), PlaceRoad_BusStation(), PlaceRoad_TruckStation(), PlaceRoad_Waypoint(), PopulateStationsNearby(), Station::RecomputeCatchment(), and StationJoinerNeeded().

## ◆ vehicle

VehicleSettings GameSettings::vehicle

options for vehicles

Definition at line 641 of file settings_type.h.

Referenced by AffectSpeedByZChange(), AfterLoadGame(), AfterLoadVehiclesPhase2(), AircraftController(), CalcEngineReliability(), CanBuildVehicleInfrastructure(), CheckNewTrain(), CheckTakeoverVehicleLimit(), CheckTrainAttachment(), CmdBuildRoadVehicle(), CmdConvertRail(), CmdRefitVehicle(), CmdReverseTrainDirection(), Train::ConsistChanged(), DisplayVehicleSortDropDown(), LinkGraphOverlay::DrawContent(), DrawTrainDetails(), VehicleDetailsWindow::DrawWidget(), FreightWagonMult(), RoadVehicle::GetCurrentMaxSpeed(), Train::GetCurrentMaxSpeed(), Train::GetCurveSpeedLimit(), GetFreeUnitNumber(), GetGlobalVariable(), Engine::GetLifeLengthInDays(), GetNewEngine(), GetNewEngineID(), RoadVehicle::GetSlopeSteepness(), Train::GetSlopeSteepness(), HasRailCatenaryDrawn(), InitializePatchFlags(), IsVehicleTypeDisabled(), MaybeCrashAirplane(), BuildVehicleWindow::OnInvalidateData(), ParamSet(), ReplaceChain(), RoadVehAccelerationModelChanged(), Vehicle::ShowVisualEffect(), TrainController(), TrainDetailsCapacityTab(), TrainDetailsCargoTab(), UpdateAircraftSpeed(), RoadVehicle::UpdateSpeed(), and Train::UpdateSpeed().

The documentation for this struct was generated from the following file:

- src/settings_type.h