# settings_type.h File Reference

Types related to global configuration settings. More...

`#include "date_type.h"`
`#include "town_type.h"`
`#include "transport_type.h"`
`#include "network/core/config.h"`
`#include "company_type.h"`
`#include "openttd.h"`

Go to the source code of this file.

## Data Structures
struct | DifficultySettings
| Settings related to the difficulty of the game. More...
struct | GUISettings
| Settings related to the GUI and other stuff that is not saved in the savegame. More...
struct | LocaleSettings
| Settings related to currency/unit systems. More...
struct | NetworkSettings
| All settings related to the network. More...
struct | GameCreationSettings
| Settings related to the creation of games. More...
struct | ConstructionSettings
| Settings related to construction in-game. More...
struct | AISettings
| Settings related to the AI. More...
struct | OPFSettings
| Settings related to the old pathfinder. More...
struct | NPFSettings
| Settings related to the new pathfinder. More...
struct | YAPFSettings
| Settings related to the yet another pathfinder. More...
struct | PathfinderSettings
| Settings related to all pathfinders. More...
struct | OrderSettings
| Settings related to orders. More...
struct | VehicleSettings
| Settings related to vehicles. More...
struct | EconomySettings
| Settings related to the economy. More...
struct | StationSettings
| Settings related to stations. More...
struct | VehicleDefaultSettings
| Default settings for vehicles. More...
struct | CompanySettings
| Settings that can be set per company. More...
struct | GameSettings
| All settings together for the game. More...
struct | ClientSettings
| All settings that are only important for the local client. More...
## Enumerations
enum | IndustryDensity { ID_FUND_ONLY, ID_MINIMAL, ID_VERY_LOW, ID_LOW, ID_NORMAL, ID_HIGH, ID_END }
| Available industry map generation densities. More...
## Functions
static GameSettings & | GetGameSettings ()
| Get the settings-object applicable for the current situation: the newgame settings when we're in the main menu and otherwise the settings of the current game.
## Variables
ClientSettings | _settings_client
| The current settings for this game.
GameSettings | _settings_game
| The current settings for this game.
GameSettings | _settings_newgame
| The settings values that are used for new games and/or modified in config file.

## Detailed Description

Types related to global configuration settings.

Definition in file settings_type.h.

## Enumeration Type Documentation

enum IndustryDensity

Available industry map generation densities.

Enumerator:

  ID_FUND_ONLY | The game does not build industries.
  ID_MINIMAL | Start with just the industries that must be present.
  ID_VERY_LOW | Very few industries at game start.
  ID_LOW | Few industries at game start.
  ID_NORMAL | Normal amount of industries at game start.
  ID_HIGH | Many industries at game start.
  ID_END | Number of industry density settings.

Definition at line 23 of file settings_type.h.

## Variable Documentation

ClientSettings _settings_client

The current settings for this game.

Definition at line 71 of file settings.cpp.

Referenced by AddNewsItem(), AfterLoadGame(), ServerNetworkGameSocketHandler::AllowConnection(), ServerNetworkAdminSocketHandler::AllowConnection(), BuildOwnerLegend(), BuildRailClick_Remove(), CalcRaildirsDrawstyle(), CanBuildVehicleInfrastructure(), CcBuildRailTunnel(), CcBuildRoadTunnel(), CcRoadStop(), CheckMinActiveClients(), CheckOrders(), CheckPauseOnJoin(), BuildRailStationWindow::CheckSelectedSize(), CheckSoftLimit(), ClearPathReservation(), CmdCompanyCtrl(), CompaniesYearlyLoop(), Order::ConvertFromOldSavegame(), DEF_GAME_RECEIVE_COMMAND(), DispatchRightClickEvent(), DistributeQueue(), DoAutosave(), DrawCategories(), DrawTile_Road(), DrawTile_TunnelBridge(), DrawTrackBits(), TimetableWindow::DrawWidget(), NetworkStartServerWindow::DrawWidget(), DrawYearColumn(), GenerateDefaultSaveName(), GenericPlaceSignals(), GetLogPrefix(), GetSmallMapContoursPixels(), GetSmallMapIndustriesPixels(), GetSmallMapOwnerPixels(), GetSmallMapRoutesPixels(), GetSmallMapVehiclesPixels(), HandleAutoscroll(), HandleAutoSignalPlacement(), HandleMouseEvents(), Vehicle::HandlePathfindingResult(), HandleViewportScroll(), HandleWindowDragging(), IConsoleDebug(), IConsoleWarning(), InitializeRailGUI(), LoadUnloadVehicle(), MaybeStartNewCompany(), NetworkClientPreferTeamChat(), NetworkDisconnect(), NetworkMaxCompaniesReached(), NetworkMaxSpectatorsReached(), NetworkServerSetCompanyPassword(), NetworkStartUp(), TimetableWindow::OnClick(), GameOptionsWindow::OnClick(), BuildRoadStationWindow::OnClick(), BuildSignalWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildRailToolbarWindow::OnClick(), NetworkLobbyWindow::OnClick(), NetworkStartServerWindow::OnClick(), NetworkGameWindow::OnClick(), SaveLoadWindow::OnClick(), BuildDocksStationWindow::OnClick(), BuildAirportWindow::OnClick(), GameOptionsWindow::OnDropdownSelect(), NetworkStartServerWindow::OnDropdownSelect(), NetworkGameWindow::OnDropdownSelect(), BuildSignalWindow::OnInvalidateData(), SaveLoadWindow::OnInvalidateData(), SelectCompanyLiveryWindow::OnInvalidateData(), NetworkStartServerWindow::OnKeyPress(), NetworkGameWindow::OnKeyPress(), MainWindow::OnKeyPress(), ExtraViewportWindow::OnMouseWheel(), SmallMapWindow::OnMouseWheel(), MainWindow::OnMouseWheel(), OnNewMonth(), OnNewYear(), BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), BuildRoadToolbarWindow::OnPlaceMouseUp(), BuildRailToolbarWindow::OnPlaceMouseUp(), OrdersWindow::OnPlaceObject(), BuildIndustryWindow::OnPlaceObject(), TimetableWindow::OnQueryTextFinished(), NetworkStartServerWindow::OnQueryTextFinished(), OrdersWindow::OrderClick_NearestDepot(), PlaceRail_Station(), PositionMainToolbar(), PositionNetworkChatWindow(), PositionNewsMessage(), PositionStatusbar(), ResetSignalVariant(), SaveOrLoad(), ServerNetworkGameSocketHandler::ServerNetworkGameSocketHandler(), SetDefaultRailGui(), GameOptionsWindow::SetStringParameters(), BuildSignalWindow::SetStringParameters(), NetworkStartServerWindow::SetStringParameters(), NetworkGameWindow::SetStringParameters(), SetTimetableParams(), NWidgetLeaf::SetupSmallestSize(), ShowErrorMessage(), ShowMeasurementTooltips(), ShowNetworkLobbyWindow(), ShowSelectBaseStationIfNeeded(), IConsoleLine::Truncate(), TryPathReserve(), TryReserveRailTrack(), UnreserveRailTrack(), TimetableWindow::UpdateSelectionStates(), UpdateViewportPosition(), Town::UpdateVirtCoord(), CompanyFinancesWindow::UpdateWidgetSize(), VehicleEnterDepot(), and VpSelectTilesWithMethod().

GameSettings _settings_game

The current settings for this game.

Definition at line 72 of file settings.cpp.

Referenced by _GenerateWorld(), AddInflation(), AffectSpeedByZChange(), AfterLoadGame(), AfterLoadVehicles(), AircraftController(), AircraftEventHandler_AtTerminal(), AITileList_IndustryAccepting::AITileList_IndustryAccepting(), AITileList_IndustryProducing::AITileList_IndustryProducing(), AlwaysDrawUnpavedRoads(), AutoslopeEnabled(), Subsidy::AwardTo(), BuildRailClick_Remove(), BuildTownHouse(), AIRoad::CanBuildConnectedRoadParts(), AIIndustryType::CanBuildIndustry(), CanBuildVehicleInfrastructure(), CanExpandRailStation(), AIIndustryType::CanProspectIndustry(), AI::CanStartNew(), ChangeIndustryProduction(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckBridgeAvailability(), CheckBuildableTile(), CheckFlatLandRoadStop(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckIndustryCloseDownProtection(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), CheckNewIndustry_OilRefinery(), CheckNewIndustry_OilRig(), CheckNewTrain(), CheckNextTrainTile(), CheckRailSlope(), CheckRoadSlope(), CheckSwitchToEuro(), CheckTrainAttachment(), ChooseShipTrack(), ClickChangeClimateCheat(), CmdBuildAirport(), CmdBuildBridge(), CmdBuildDock(), CmdBuildIndustry(), CmdBuildRailStation(), CmdBuildRailWaypoint(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildRoadStop(), CmdBuildRoadVehicle(), CmdBuildSingleSignal(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdBuyShareInCompany(), CmdConvertRail(), CmdFoundTown(), CmdGiveMoney(), CmdInsertOrder(), CmdPlantTree(), CmdRefitVehicle(), CmdReverseTrainDirection(), CmdSellShareInCompany(), CompaniesMonthlyLoop(), Company::Company(), Train::ConsistChanged(), ConvertDisplaySpeedToSpeed(), ConvertSpeedToDisplaySpeed(), CreateNewIndustryHelper(), DeliverGoods(), DistanceFromEdgeDir(), DoCreateTown(), DoTrainPathfind(), SmallMapWindow::DrawSmallMapColumn(), DrawTrainDetails(), VehicleDetailsWindow::DrawWidget(), TownViewWindow::DrawWidget(), ScenarioEditorToolbarWindow::DrawWidget(), ExtendTrainReservation(), FindClosestTrainDepot(), FindJoiningBaseStation(), FindSafePosition(), FindStationsAroundTiles(), FindStationsNearby(), FindTownForIndustry(), FlatEmptyWorld(), FollowTrainReservation(), FormatBytes(), FormatString(), FreightWagonMult(), GamelogMode(), GamelogTestMode(), AIInstance::GameLoop(), AI::GameLoop(), GenerateIndustries(), GenerateLandscape(), GenerateTerrainPerlin(), GenerateTownName(), GenerateTowns(), GenerateTrees(), AIAirport::GetAirportCoverageRadius(), GetAirportNoiseLevelForTown(), AITown::GetAllowedNoise(), AITile::GetCargoAcceptance(), AITile::GetCargoProduction(), Station::GetCatchmentRadius(), GetClosestWaterDistance(), GetCompanyRailtypes(), GetCompanyRoadtypes(), AIConfig::GetConfig(), IndustrySpec::GetConstructionCost(), AIIndustryType::GetConstructionCost(), AIStation::GetCoverageRadius(), RoadVehicle::GetCurrentMaxSpeed(), Train::GetCurveSpeedLimit(), TownViewWindow::GetDesiredInfoHeight(), GetDriveableTrackdirBits(), GetFreeUnitNumber(), GetGlobalVariable(), GetIndustryGamePlayProbability(), Engine::GetLifeLengthInDays(), GetMaskOfTownActions(), AIBridge::GetMaxLength(), AIEventEnginePreview::GetMaxSpeed(), AIEngine::GetMaxSpeed(), GetNewEngine(), AIAirport::GetNoiseLevelIncrease(), GetNumberOfIndustries(), GetOtherAqueductEnd(), GetRailTypeDropDownList(), GetRandomTreeType(), GetScaledIndustryGenerationProbability(), Train::GetSlopeSteepness(), RoadVehicle::GetSlopeSteepness(), GetSmallMapVegetationPixels(), GetSnowLine(), GetTerrainType(), GetTileSlope(), AIGameSettings::GetValue(), GrayscaleToMapHeights(), GrowTown(), GrowTownInTile(), GUIPlaceProcDragXY(), Vehicle::HandleBreakdown(), HasCatenaryDrawn(), HeightMapCoastLines(), HeightMapGenerate(), HeightMapNormalize(), HeightMapSineTransform(), HighestSnowLine(), IndustryCargoesWindow::HousesCanAccept(), InitLoading(), int_noise(), ObjectSpec::IsAvailable(), AirportSpec::IsAvailable(), IsCommandAllowedWhilePaused(), AIGameSettings::IsDisabledVehicleType(), IsRoadAllowedHere(), IsValidTileForWaypoint(), LoadUnloadVehicle(), LowestSnowLine(), Town::MaxTownNoise(), MaybeCrashAirplane(), MaybeStartNewCompany(), MayCompanyTakeOver(), IndustryBuildData::MonthlyLoop(), Vehicle::NeedsServicing(), NetworkServerSetCompanyPassword(), NPFFindSafeTile(), NPFSaveTargetData(), TownViewWindow::OnClick(), BuildIndustryWindow::OnClick(), BuildVehicleWindow::OnClick(), LandInfoWindow::OnInit(), BuildTreesWindow::OnInvalidateData(), BuildIndustryWindow::OnInvalidateData(), BuildVehicleWindow::OnInvalidateData(), ScenarioEditorToolbarWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), CompanyWindow::OnPaint(), BuildAirportWindow::OnPaint(), ScenarioEditorToolbarWindow::OnQueryTextFinished(), CargoPayment::PayTransfer(), CYapfCostRailT< Types >::PfCalcCost(), PlaceRail_Station(), PlaceRoad_BusStation(), PlaceRoad_TruckStation(), PlaceTreesRandomly(), AIIndustryType::ProductionCanIncrease(), RecomputePrices(), RemoveAirport(), RemoveRoad(), ReplaceChain(), AI::ResetConfig(), ResetIndustries(), ResetNewGRFData(), RoadFindPathToDest(), SaveHighScoreValue(), BuildIndustryWindow::SetStringParameters(), SetTileType(), SetYearEngineAgingStops(), Vehicle::ShowVisualEffect(), StateGameLoop(), StationJoinerNeeded(), AIInstance::Suspend(), TerraformTileHeight(), TestAutoslopeOnRailTile(), TgenSetTileHeight(), TileAddWrap(), ToolbarScenDatePanel(), TownGetVariable(), TownHouseChangeInfo(), TownLayoutAllows2x2HouseHere(), TownLayoutAllowsHouseHere(), TrainCheckIfLineEnds(), TrainDetailsCapacityTab(), TrainDetailsCargoTab(), TranslateXYToTileCoord(), TryPathReserve(), TryReserveSafeTrack(), AI::Uninitialize(), UpdateAircraftSpeed(), UpdateLandscapingLimits(), Train::UpdateSpeed(), RoadVehicle::UpdateSpeed(), UpdateTownGrowRate(), IndustrySpec::UsesSmoothEconomy(), YapfRoadVehicleChooseTrack(), YapfRoadVehicleFindNearestDepot(), YapfShipChooseTrack(), YapfTrainCheckReverse(), YapfTrainChooseTrack(), YapfTrainFindNearestDepot(), and YapfTrainFindNearestSafeTile().

GameSettings _settings_newgame

The settings values that are used for new games and/or modified in config file.

Definition at line 73 of file settings.cpp.

Referenced by _GenerateWorld(), AIConfig::GetConfig(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnDropdownSelect(), GenerateLandscapeWindow::OnDropdownSelect(), SelectGameWindow::OnInvalidateData(), GenerateLandscapeWindow::OnInvalidateData(), GenerateLandscapeWindow::OnKeyPress(), CreateScenarioWindow::OnPaint(), CreateScenarioWindow::OnQueryTextFinished(), GenerateLandscapeWindow::OnQueryTextFinished(), AI::ResetConfig(), SetNewLandscapeType(), SelectGameWindow::SetStringParameters(), CreateScenarioWindow::SetStringParameters(), GenerateLandscapeWindow::SetStringParameters(), and AI::Uninitialize().