OpenTTD Source: AfterNewGRFScan Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
AfterNewGRFScan Struct Reference

Callback structure of statements to be executed after the NewGRF scan. More...

Inheritance diagram for AfterNewGRFScan:

## Public Member Functions
| AfterNewGRFScan ()
| Create a new callback.
void | OnNewGRFsScanned () override
| Called whenever the NewGRF scan completed.
Public Member Functions inherited from NewGRFScanCallback
virtual | ~NewGRFScanCallback ()=default
| Make sure the right destructor gets called.

## Data Fields
TimerGameCalendar::Year | startyear = CalendarTime::INVALID_YEAR
| The start year.
uint32_t | generation_seed = GENERATE_NEW_SEED
| Seed for the new game.
std::string | dedicated_host
| Hostname for the dedicated server.
uint16_t | dedicated_port = 0
| Port for the dedicated server.
std::string | connection_string
| Information about the server to connect to.
std::string | join_server_password
| The password to join the server with.
bool | save_config = true
| The save config setting.

## Detailed Description

Callback structure of statements to be executed after the NewGRF scan.

Definition at line 374 of file openttd.cpp.

## Constructor & Destructor Documentation

## ◆ AfterNewGRFScan()

AfterNewGRFScan::AfterNewGRFScan | ( |  | ) |
| inline

Create a new callback.

Definition at line 386 of file openttd.cpp.

References _settings_game, GameSettings::game_creation, generation_seed, and GameCreationSettings::generation_seed.

## Member Function Documentation

## ◆ OnNewGRFsScanned()

void AfterNewGRFScan::OnNewGRFsScanned | ( |  | ) |
| inlineoverridevirtual

Called whenever the NewGRF scan completed.

Implements NewGRFScanCallback.

Definition at line 393 of file openttd.cpp.

References _network_available, _network_bind_list, _settings_client, _settings_newgame, _switch_mode, COMPANY_NEW_COMPANY, connection_string, dedicated_host, dedicated_port, TarScanner::DoScan(), MusicSettings::effect_vol, GameSettings::game_creation, generation_seed, GameCreationSettings::generation_seed, MusicDriver::GetInstance(), ClientSettings::gui, IConsoleCmdExec(), AI::Initialize(), Game::Initialize(), TimerGameConst< struct Calendar >::INVALID_YEAR, join_server_password, GUISettings::last_newgrf_count, WindowDesc::LoadFromConfig(), LoadFromConfig(), LoadFromHighScore(), LoadHotkeysFromConfig(), LoadIntroGame(), ClientSettings::music, MusicSettings::music_vol, ClientSettings::network, NetworkClientConnectGame(), ResetGRFConfig(), save_config, TarScanner::Scenario, NetworkSettings::server_port, MusicDriver::SetVolume(), startyear, AI::Uninitialize(), Game::Uninitialize(), and UpdateNewGRFConfigPalette().

## Field Documentation

## ◆ connection_string

std::string AfterNewGRFScan::connection_string

Information about the server to connect to.

Definition at line 379 of file openttd.cpp.

Referenced by OnNewGRFsScanned().

## ◆ dedicated_host

std::string AfterNewGRFScan::dedicated_host

Hostname for the dedicated server.

Definition at line 377 of file openttd.cpp.

Referenced by OnNewGRFsScanned().

## ◆ dedicated_port

uint16_t AfterNewGRFScan::dedicated_port = 0

Port for the dedicated server.

Definition at line 378 of file openttd.cpp.

Referenced by OnNewGRFsScanned().

## ◆ generation_seed

uint32_t AfterNewGRFScan::generation_seed = GENERATE_NEW_SEED

Seed for the new game.

Definition at line 376 of file openttd.cpp.

Referenced by AfterNewGRFScan(), and OnNewGRFsScanned().

## ◆ join_server_password

std::string AfterNewGRFScan::join_server_password

The password to join the server with.

Definition at line 380 of file openttd.cpp.

Referenced by OnNewGRFsScanned().

## ◆ save_config

bool AfterNewGRFScan::save_config = true

The save config setting.

Definition at line 381 of file openttd.cpp.

Referenced by OnNewGRFsScanned().

## ◆ startyear

TimerGameCalendar::Year AfterNewGRFScan::startyear = CalendarTime::INVALID_YEAR

The start year.

Definition at line 375 of file openttd.cpp.

Referenced by OnNewGRFsScanned().

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

- src/openttd.cpp