OpenTTD
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  SoundSettings
 Settings related to sound effects. More...
 
struct  MusicSettings
 Settings related to music. More...
 
struct  LocaleSettings
 Settings related to currency/unit systems. More...
 
struct  NewsSettings
 Settings related to news. 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  SettingsProfile {
  SP_BEGIN = 0, SP_EASY = SP_BEGIN, SP_MEDIUM, SP_HARD,
  SP_END, SP_CUSTOM = SP_END, SP_SAVED_HIGHSCORE_END, SP_MULTIPLAYER = SP_SAVED_HIGHSCORE_END,
  SP_HIGHSCORE_END
}
 Settings profiles and highscore tables. More...
 
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 GameSettingsGetGameSettings ()
 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. More...
 
GameSettings _settings_game
 The current settings for this game. More...
 
GameSettings _settings_newgame
 The settings values that are used for new games and/or modified in config file. More...
 
VehicleDefaultSettings _old_vds
 Old vehicle settings, which were game settings before, and are company settings now. More...
 

Detailed Description

Types related to global configuration settings.

Definition in file settings_type.h.

Enumeration Type Documentation

◆ 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 43 of file settings_type.h.

◆ SettingsProfile

Settings profiles and highscore tables.

Enumerator
SP_EASY 

Easy difficulty.

SP_MEDIUM 

Medium difficulty.

SP_HARD 

Hard difficulty.

SP_END 

End of setting profiles.

SP_CUSTOM 

No profile, special "custom" highscore.

SP_SAVED_HIGHSCORE_END 

End of saved highscore tables.

SP_MULTIPLAYER 

Special "multiplayer" highscore. Not saved, always specific to the current game.

SP_HIGHSCORE_END 

End of highscore tables.

Definition at line 27 of file settings_type.h.

Variable Documentation

◆ _old_vds

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

(Needed for savegame conversion)

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

Definition at line 79 of file settings.cpp.

◆ _settings_client

ClientSettings _settings_client

The current settings for this game.

Definition at line 76 of file settings.cpp.

Referenced by AIDebugWindow::AIDebugWindow(), ServerNetworkAdminSocketHandler::AllowConnection(), ServerNetworkGameSocketHandler::AllowConnection(), BuildAirportWindow::BuildAirportClassDropDown(), BuildLandLegend(), BuildOwnerLegend(), BuildRailClick_Remove(), CcBuildBridge(), CcBuildRailTunnel(), CcBuildRoadTunnel(), CcRoadStop(), AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::ChangeAnimationFrame(), CheckMinActiveClients(), CheckOrders(), CheckPauseOnJoin(), BuildRailStationWindow::CheckSelectedSize(), CheckSoftLimit(), ClearPathReservation(), CompanyServiceInterval(), Order::ConvertFromOldSavegame(), DEF_CONSOLE_HOOK(), GRFFileScanner::DoScan(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), NetworkStartServerWindow::DrawWidget(), FloodVehicle(), GetLogPrefix(), GetOrderCmdFromTile(), GetSmallMapContoursPixels(), GetSmallMapIndustriesPixels(), GetSmallMapVehiclesPixels(), Vehicle::HandlePathfindingResult(), HandlePlacePushButton(), HandleViewportScroll(), HandleZoomMessage(), IConsoleDebug(), IConsoleWarning(), InitializeMusic(), MaybeBarCrossingWithSound(), MaybeStartNewCompany(), NetworkAutoCleanCompanies(), NetworkCheckRestartMap(), NetworkClientPreferTeamChat(), NetworkDisconnect(), NetworkInitChatMessage(), NetworkMaxCompaniesReached(), NetworkServer_Tick(), NetworkServerSetCompanyPassword(), NetworkStartUp(), NetworkUDPAdvertise(), NetworkUDPAdvertiseThread(), NetworkUDPRemoveAdvertiseThread(), NetworkUpdateClientName(), TransparenciesWindow::OnClick(), SmallMapWindow::OnClick(), BuildDocksStationWindow::OnClick(), BuildAirportWindow::OnClick(), NetworkGameWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildRailDepotWindow::OnClick(), BuildRailWaypointWindow::OnClick(), IndustryCargoesWindow::OnClick(), NetworkGameWindow::OnDropdownSelect(), NetworkStartServerWindow::OnDropdownSelect(), GameSettingsWindow::OnDropdownSelect(), NetworkGameWindow::OnEditboxChanged(), NetworkStartServerWindow::OnEditboxChanged(), MusicTrackSelectionWindow::OnInvalidateData(), MusicWindow::OnInvalidateData(), BuildSignalWindow::OnInvalidateData(), ExtraViewportWindow::OnMouseWheel(), SmallMapWindow::OnMouseWheel(), MainWindow::OnMouseWheel(), AfterNewGRFScan::OnNewGRFsScanned(), OnNewMonth(), CompanyFinancesWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), TimetableWindow::OnQueryTextFinished(), NetworkStartServerWindow::OnQueryTextFinished(), OrdersWindow::OrderClick_NearestDepot(), PlayVehicleSound(), PopupMainToolbMenu(), PositionMainToolbar(), PositionNetworkChatWindow(), PositionNewsMessage(), PositionStatusbar(), AISettingsWindow::RebuildVisibleSettings(), ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(), MasterNetworkUDPSocketHandler::Receive_MASTER_ACK_REGISTER(), ScriptScanner::RegisterScript(), ResetSignalVariant(), StationViewWindow::SelectGroupBy(), StationViewWindow::SelectSortBy(), StationViewWindow::SelectSortOrder(), ServerNetworkGameSocketHandler::SendConfigUpdate(), ServerNetworkGameSocketHandler::SendNeedCompanyPassword(), ServerNetworkGameSocketHandler::SendWelcome(), ServerNetworkAdminSocketHandler::SendWelcome(), ServerNetworkGameSocketHandler::ServerNetworkGameSocketHandler(), MusicTrackSelectionWindow::SetStringParameters(), NetworkGameWindow::SetStringParameters(), NetworkStartServerWindow::SetStringParameters(), BuildSignalWindow::SetStringParameters(), GRFConfig::SetSuitablePalette(), SetTimetableParams(), SetupScreenshotViewport(), ShowNewspaper(), ShowSelectBaseStationIfNeeded(), ShowTicker(), SndPlayScreenCoordFx(), NewGRFWindow::TagNameFilter(), IConsoleLine::Truncate(), OrdersWindow::UpdateAutoRefitState(), TimetableWindow::UpdateSelectionStates(), CompanyFinancesWindow::UpdateWidgetSize(), and VpSelectTilesWithMethod().

◆ _settings_game

GameSettings _settings_game

The current settings for this game.

The current settings for this game.

Definition at line 77 of file settings.cpp.

Referenced by AddInflation(), AffectSpeedByZChange(), AutoslopeEnabled(), BuildLandLegend(), BuildTownHouse(), CalcEngineReliability(), CanFollowRoad(), AI::CanStartNew(), CheckBridgeAvailability(), CheckBuildableTile(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), CheckIfCanLevelIndustryPlatform(), CheckIfTrainNeedsService(), CheckIndustryCloseDownProtection(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), CheckNewTrain(), CheckNextTrainTile(), CheckRailSlope(), CheckRoadSlope(), CheckSwitchToEuro(), CheckTrainAttachment(), CheckTrainStayInDepot(), ClampXYToMap(), ClickChangeMaxHlCheat(), CmdBuildRoadDepot(), CmdBuildTrainDepot(), CmdConvertRail(), CmdFoundTown(), CmdGiveMoney(), CmdLevelLand(), CompaniesMonthlyLoop(), Company::Company(), ConvertDisplaySpeedToKmhishSpeed(), ConvertDisplaySpeedToSpeed(), ConvertKmhishSpeedToDisplaySpeed(), ConvertSpeedToDisplaySpeed(), CreateRivers(), DeleteStaleLinks(), DisplayVehicleSortDropDown(), DistanceFromEdgeDir(), DoTrainPathfind(), LinkGraphOverlay::DrawContent(), StationViewWindow::DrawEntries(), DrawRoadAsSnowDesert(), ScenarioEditorToolbarWindow::DrawWidget(), ExtendTrainReservation(), FindSafePosition(), FindSpring(), FindStationsAroundTiles(), FindTownForIndustry(), FlatEmptyWorld(), FormatNumber(), FreightWagonMult(), AI::GameLoop(), ScriptInstance::GameLoop(), GenerateLandscape(), GenerateTerrainPerlin(), GenerateTownName(), GenerateTrees(), GetAirportNoiseLevelForTown(), GetAmplitude(), Station::GetCatchmentRadius(), RoadVehicle::GetCurrentMaxSpeed(), Train::GetCurrentMaxSpeed(), GetDriveableTrackdirBits(), GetFreeUnitNumber(), GetGlobalVariable(), GetIndustryGamePlayProbability(), Engine::GetLifeLengthInDays(), GetLoadAmount(), GetMaskOfTownActions(), GetOtherAqueductEnd(), GetRandomTreeType(), GetScaledIndustryGenerationProbability(), RoadVehicle::GetSlopeSteepness(), Train::GetSlopeSteepness(), GetSnowLine(), GetTerrainType(), TownScopeResolver::GetVariable(), GfxLoadSprites(), GUIPlaceProcDragXY(), HasRailCatenaryDrawn(), HeightMapCoastLines(), HeightMapNormalize(), HeightMapSineTransform(), HighestSnowLine(), IndustryCargoesWindow::HousesCanAccept(), InitializeGRFSpecial(), AirportSpec::IsAvailable(), Engine::IsEnabled(), ObjectSpec::IsEverAvailable(), IsRoadAllowedHere(), IsVehicleTypeDisabled(), LoadNewGRF(), LoadSpriteTables(), LowestSnowLine(), Town::MaxTownNoise(), MaybeCrashAirplane(), MayCompanyTakeOver(), IndustryBuildData::MonthlyLoop(), Vehicle::NeedsServicing(), NetworkServerSetCompanyPassword(), NPFFindSafeTile(), NPFSaveTargetData(), LandInfoWindow::OnInit(), BuildIndustryWindow::OnInvalidateData(), BuildVehicleWindow::OnInvalidateData(), CompanyWindow::OnInvalidateData(), BuildAirportWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), ScenarioEditorToolbarWindow::OnPaint(), CreateScenarioWindow::OnQueryTextFinished(), OnTick_LinkGraph(), ScriptInstance::Pause(), SmallMapWindow::RebuildColourIndexIfNecessary(), ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(), RecomputePrices(), AI::ResetConfig(), RoadFindPathToDest(), ServerNetworkGameSocketHandler::SendNeedCompanyPassword(), ServerNetworkGameSocketHandler::SendWelcome(), SetStartingYear(), SetupScreenshotViewport(), StationViewWindow::ShowCargo(), StationJoinerNeeded(), TestAutoslopeOnRailTile(), TGPGetMaxHeight(), ToolbarScenDatePanel(), TownLayoutAllows2x2HouseHere(), TownLayoutAllowsHouseHere(), TrainCheckIfLineEnds(), TryReserveSafeTrack(), AI::Uninitialize(), UpdateAircraftSpeed(), RoadVehicle::UpdateSpeed(), Train::UpdateSpeed(), UpdateTownGrowRate(), IndustrySpec::UsesSmoothEconomy(), YapfRoadVehicleChooseTrack(), YapfRoadVehicleFindNearestDepot(), YapfShipCheckReverse(), YapfShipChooseTrack(), YapfTrainCheckReverse(), YapfTrainChooseTrack(), YapfTrainFindNearestDepot(), YapfTrainFindNearestSafeTile(), and LinkGraphJob::~LinkGraphJob().

◆ _settings_newgame

GameSettings _settings_newgame