Data Structures | Enumerations | Functions | Variables

# 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 "cargotype.h"`
`#include "linkgraph/linkgraph_type.h"`
`#include "zoom_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 | MusicSettings
| Settings related to music. 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 | ScriptSettings
| Settings related to scripts. 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 | LinkGraphSettings
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.
VehicleDefaultSettings | _old_vds
| Old vehicle settings, which were game settings before, and are company settings now.

## 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 26 of file settings_type.h.

## Variable Documentation

VehicleDefaultSettings _old_vds

Old vehicle settings, which were game settings before, and are company settings now.

(Needed for savegame conversion)

Definition at line 77 of file settings.cpp.

Referenced by AfterLoadGame().

ClientSettings _settings_client

The current settings for this game.

Definition at line 74 of file settings.cpp.

Referenced by AddNewsItem(), AfterLoadGame(), AIDebugWindow::AIDebugWindow(), ServerNetworkGameSocketHandler::AllowConnection(), ServerNetworkAdminSocketHandler::AllowConnection(), GameOptionsWindow::BuildDropDownList(), BuildLandLegend(), BuildOwnerLegend(), BuildRailClick_Remove(), CalcRaildirsDrawstyle(), CanBuildVehicleInfrastructure(), CcBuildRailTunnel(), CcBuildRoadTunnel(), CcRoadStop(), CheckMinActiveClients(), CheckOrders(), CheckPauseOnJoin(), BuildRailStationWindow::CheckSelectedSize(), CheckSoftLimit(), CheckTrainStayInDepot(), ClearPathReservation(), CmdCompanyCtrl(), CompaniesYearlyLoop(), Order::ConvertFromOldSavegame(), DispatchRightClickEvent(), DistributeQueue(), DoAutosave(), GRFFileScanner::DoScan(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), DoZoomInOutWindow(), DrawCategories(), BaseGraphWindow::DrawGraph(), DrawTile_Road(), DrawTile_TunnelBridge(), DrawTrackBits(), TimetableWindow::DrawWidget(), ScanProgressWindow::DrawWidget(), MusicWindow::DrawWidget(), MusicTrackSelectionWindow::DrawWidget(), DrawYearColumn(), Blitter_8bppOptimized::Encode(), Blitter_32bppOptimized::Encode(), GenerateDefaultSaveName(), GenericPlaceSignals(), GetLogPrefix(), GetSmallMapContoursPixels(), GetSmallMapIndustriesPixels(), GetSmallMapOwnerPixels(), GetSmallMapRoutesPixels(), GetSmallMapVehiclesPixels(), HandleAutoscroll(), HandleAutoSignalPlacement(), HandleMouseEvents(), Vehicle::HandlePathfindingResult(), HandleViewportScroll(), HandleWindowDragging(), HandleZoomMessage(), IConsoleDebug(), IConsoleWarning(), InitializeMusic(), InitializeRailGUI(), InitializeWindowViewport(), LoadUnloadVehicle(), MakeScreenshot(), MaybeStartNewCompany(), MenuClickSettings(), NetworkAutoCleanCompanies(), NetworkCheckRestartMap(), NetworkClientPreferTeamChat(), NetworkDisconnect(), NetworkInitChatMessage(), NetworkMaxCompaniesReached(), NetworkMaxSpectatorsReached(), NetworkServer_Tick(), NetworkServerSendChat(), NetworkServerSetCompanyPassword(), NetworkStartUp(), NetworkUDPAdvertise(), NetworkUDPAdvertiseThread(), NetworkUDPInitialize(), NetworkUDPRemoveAdvertiseThread(), NetworkUpdateClientName(), TimetableWindow::OnClick(), BuildRoadStationWindow::OnClick(), BuildSignalWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildRailToolbarWindow::OnClick(), NetworkLobbyWindow::OnClick(), MusicWindow::OnClick(), MusicTrackSelectionWindow::OnClick(), BuildDocksStationWindow::OnClick(), BuildAirportWindow::OnClick(), GameOptionsWindow::OnDropdownSelect(), SelectGameWindow::OnInit(), BuildSignalWindow::OnInvalidateData(), MusicWindow::OnInvalidateData(), MusicTrackSelectionWindow::OnInvalidateData(), SaveLoadWindow::OnInvalidateData(), SelectCompanyLiveryWindow::OnInvalidateData(), MainWindow::OnKeyPress(), ExtraViewportWindow::OnMouseWheel(), SmallMapWindow::OnMouseWheel(), MainWindow::OnMouseWheel(), AfterNewGRFScan::OnNewGRFsScanned(), OnNewMonth(), OnNewYear(), BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), BuildRoadToolbarWindow::OnPlaceMouseUp(), BuildRailToolbarWindow::OnPlaceMouseUp(), OrdersWindow::OnPlaceObject(), BuildIndustryWindow::OnPlaceObject(), TimetableWindow::OnQueryTextFinished(), OrdersWindow::OrderClick_NearestDepot(), PlaceRail_Station(), PositionMainToolbar(), PositionNetworkChatWindow(), PositionNewsMessage(), PositionStatusbar(), AISettingsWindow::RebuildVisibleSettings(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(), ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(), MasterNetworkUDPSocketHandler::Receive_MASTER_ACK_REGISTER(), ScriptScanner::RegisterScript(), ResetSignalVariant(), SaveOrLoad(), StationViewWindow::SelectGroupBy(), StationViewWindow::SelectSortBy(), StationViewWindow::SelectSortOrder(), ServerNetworkGameSocketHandler::SendConfigUpdate(), ClientNetworkGameSocketHandler::SendJoin(), ServerNetworkGameSocketHandler::SendNeedCompanyPassword(), ServerNetworkGameSocketHandler::SendWelcome(), ServerNetworkAdminSocketHandler::SendWelcome(), ServerNetworkGameSocketHandler::ServerNetworkGameSocketHandler(), SetDefaultRailGui(), GameOptionsWindow::SetStringParameters(), BuildSignalWindow::SetStringParameters(), MusicTrackSelectionWindow::SetStringParameters(), GRFConfig::SetSuitablePalette(), SetTimetableParams(), NWidgetLeaf::SetupSmallestSize(), ShowErrorMessage(), ShowMeasurementTooltips(), ShowNetworkLobbyWindow(), ShowSelectBaseStationIfNeeded(), SndPlayScreenCoordFx(), ToggleBoundingBoxes(), IConsoleLine::Truncate(), TryPathReserve(), TryReserveRailTrack(), UnreserveRailTrack(), ScanProgressWindow::UpdateNewGRFScanStatus(), TimetableWindow::UpdateSelectionStates(), UpdateViewportPosition(), Town::UpdateVirtCoord(), CompanyFinancesWindow::UpdateWidgetSize(), VehicleEnterDepot(), and VpSelectTilesWithMethod().

GameSettings _settings_game

The current settings for this game.

Definition at line 75 of file settings.cpp.

Referenced by _GenerateWorld(), AddInflation(), AffectSpeedByZChange(), AfterLoadGame(), AfterLoadVehicles(), AircraftController(), AircraftEventHandler_AtTerminal(), AlwaysDrawUnpavedRoads(), AutoslopeEnabled(), Subsidy::AwardTo(), BuildRailClick_Remove(), BuildTownHouse(), CalcEngineReliability(), CanBuildVehicleInfrastructure(), CanExpandRailStation(), AI::CanStartNew(), ChangeIndustryProduction(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckBridgeAvailability(), CheckBuildableTile(), AISettingsWindow::CheckDifficultyLevel(), CheckFlatLandRoadStop(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckIfTrainNeedsService(), CheckIndustryCloseDownProtection(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), CheckNewIndustry_OilRefinery(), CheckNewIndustry_OilRig(), CheckNewTrain(), CheckNextTrainTile(), CheckRailSlope(), CheckRoadSlope(), CheckSwitchToEuro(), CheckTrainAttachment(), CheckTrainStayInDepot(), ChooseShipTrack(), CmdBuildAirport(), CmdBuildBridge(), CmdBuildDock(), CmdBuildIndustry(), CmdBuildRailStation(), CmdBuildRailWaypoint(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildRoadStop(), CmdBuildRoadVehicle(), CmdBuildSingleSignal(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdBuyShareInCompany(), CmdConvertRail(), CmdFoundTown(), CmdGiveMoney(), CmdInsertOrder(), CmdPlantTree(), CmdRefitVehicle(), CmdReverseTrainDirection(), CmdSellShareInCompany(), CompaniesGenStatistics(), CompaniesMonthlyLoop(), Company::Company(), Train::ConsistChanged(), ConvertDisplaySpeedToKmhishSpeed(), ConvertDisplaySpeedToSpeed(), ConvertKmhishSpeedToDisplaySpeed(), ConvertSpeedToDisplaySpeed(), CreateNewIndustryHelper(), CreateRivers(), DeliverGoods(), DistanceFromEdgeDir(), DoCreateTown(), DoTrainPathfind(), SmallMapWindow::DrawSmallMapColumn(), DrawTrainDetails(), VehicleDetailsWindow::DrawWidget(), TownViewWindow::DrawWidget(), ScenarioEditorToolbarWindow::DrawWidget(), CompanyInfrastructureWindow::DrawWidget(), ExtendTrainReservation(), FinaliseHouseArray(), FindClosestTrainDepot(), FindJoiningBaseStation(), FindSafePosition(), FindSpring(), FindStationsAroundTiles(), FindStationsNearby(), FindTownForIndustry(), FlatEmptyWorld(), FlowRiver(), FollowTrainReservation(), FormatBytes(), FormatNumber(), FormatString(), FreightWagonMult(), GamelogMode(), GamelogTestMode(), ScriptInstance::GameLoop(), AI::GameLoop(), GenerateIndustries(), GenerateLandscape(), GenerateTerrainPerlin(), GenerateTownName(), GenerateTowns(), GenerateTrees(), GetAirportNoiseLevelForTown(), Station::GetCatchmentRadius(), GetClosestWaterDistance(), GetCompanyRailtypes(), GetCompanyRoadtypes(), GameConfig::GetConfig(), AIConfig::GetConfig(), IndustrySpec::GetConstructionCost(), RoadVehicle::GetCurrentMaxSpeed(), Train::GetCurveSpeedLimit(), TownViewWindow::GetDesiredInfoHeight(), GetDriveableTrackdirBits(), GetFreeUnitNumber(), GetGlobalVariable(), GetIndustryGamePlayProbability(), Engine::GetLifeLengthInDays(), GetMaskOfTownActions(), GetNewEngine(), GetNewEngineID(), GetNumberOfIndustries(), GetOtherAqueductEnd(), GetRailTypeDropDownList(), GetRandomTreeType(), GetScaledIndustryGenerationProbability(), Train::GetSlopeSteepness(), RoadVehicle::GetSlopeSteepness(), GetSmallMapVegetationPixels(), GetSnowLine(), GetTerrainType(), GetTileSlope(), GfxLoadSprites(), GrayscaleToMapHeights(), GrowTown(), GrowTownInTile(), GUIPlaceProcDragXY(), Vehicle::HandleBreakdown(), HasCatenaryDrawn(), HeightMapCoastLines(), HeightMapGenerate(), HeightMapNormalize(), HeightMapSineTransform(), HighestSnowLine(), IndustryCargoesWindow::HousesCanAccept(), IndustriesChangeInfo(), LinkGraphComponent::Init(), InitializeGRFSpecial(), InitLoading(), int_noise(), ObjectSpec::IsAvailable(), AirportSpec::IsAvailable(), IsCommandAllowedWhilePaused(), IsRoadAllowedHere(), IsValidTileForWaypoint(), LoadNewGRF(), LoadSpriteTables(), LoadUnloadVehicle(), LowestSnowLine(), MakeLake(), Town::MaxTownNoise(), MaybeCrashAirplane(), MaybeStartNewCompany(), MayCompanyTakeOver(), MenuClickTown(), IndustryBuildData::MonthlyLoop(), Vehicle::NeedsServicing(), NetworkServerSetCompanyPassword(), NPFFindSafeTile(), NPFSaveTargetData(), TownViewWindow::OnClick(), BuildIndustryWindow::OnClick(), BuildVehicleWindow::OnClick(), BuildTreesWindow::OnInit(), LandInfoWindow::OnInit(), BuildIndustryWindow::OnInvalidateData(), BuildVehicleWindow::OnInvalidateData(), ScenarioEditorToolbarWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), CompanyWindow::OnPaint(), BuildAirportWindow::OnPaint(), ScenarioEditorToolbarWindow::OnQueryTextFinished(), OnTick_LinkGraph(), ParamSet(), CargoPayment::PayTransfer(), CYapfCostRailT< Types >::PfCalcCost(), PlaceRail_Station(), PlaceRoad_BusStation(), PlaceRoad_TruckStation(), PlaceTreesRandomly(), ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(), RecomputePrices(), RemoveAirport(), RemoveRoad(), ReplaceChain(), ReserveConsist(), AI::ResetConfig(), ResetIndustries(), ResetNewGRFData(), ReverseTrainDirection(), RoadFindPathToDest(), Station::RunAverages(), SaveHighScoreValue(), ServerNetworkGameSocketHandler::SendNeedCompanyPassword(), ServerNetworkGameSocketHandler::SendWelcome(), ServerNetworkAdminSocketHandler::SendWelcome(), BuildIndustryWindow::SetStringParameters(), SetTileType(), SetYearEngineAgingStops(), Vehicle::ShowVisualEffect(), StartupOneEngine(), StateGameLoop(), StationJoinerNeeded(), ScriptInstance::Suspend(), TerraformTileHeight(), TestAutoslopeOnRailTile(), TgenSetTileHeight(), TileAddWrap(), ToolbarScenDatePanel(), TownGetVariable(), TownHouseChangeInfo(), TownLayoutAllows2x2HouseHere(), TownLayoutAllowsHouseHere(), TrainCheckIfLineEnds(), TrainController(), TrainDetailsCapacityTab(), TrainDetailsCargoTab(), TranslateXYToTileCoord(), TryPathReserve(), TryReserveSafeTrack(), Game::Uninitialize(), AI::Uninitialize(), UpdateAircraftSpeed(), UpdateLandscapingLimits(), Train::UpdateSpeed(), RoadVehicle::UpdateSpeed(), UpdateTownGrowRate(), CompanyInfrastructureWindow::UpdateWidgetSize(), 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 76 of file settings.cpp.

Referenced by _GenerateWorld(), AISettingsWindow::CheckDifficultyLevel(), GameConfig::GetConfig(), AIConfig::GetConfig(), CreateScenarioWindow::OnClick(), CreateScenarioWindow::OnDropdownSelect(), SelectGameWindow::OnInvalidateData(), GenerateLandscapeWindow::OnInvalidateData(), AfterNewGRFScan::OnNewGRFsScanned(), CreateScenarioWindow::OnPaint(), CreateScenarioWindow::OnQueryTextFinished(), AI::ResetConfig(), SetNewLandscapeType(), SelectGameWindow::SetStringParameters(), CreateScenarioWindow::SetStringParameters(), StartNewGameWithoutGUI(), Game::Uninitialize(), and AI::Uninitialize().