OpenTTD Source 20250312-master-gcdcc6b491d
ExternalTownData Struct Reference

Town data imported from JSON files and used to place towns. More...

Data Fields

TownID town_id
 The TownID of the town in OpenTTD. Not imported, but set during the founding proceess and stored here for convenience.
 
std::string name
 The name of the town.
 
uint population
 The target population of the town when created in OpenTTD. If input is blank, defaults to 0.
 
bool is_city
 Should it be created as a city in OpenTTD? If input is blank, defaults to false.
 
float x_proportion
 The X coordinate of the town, as a proportion 0..1 of the maximum X coordinate.
 
float y_proportion
 The Y coordinate of the town, as a proportion 0..1 of the maximum Y coordinate.
 

Detailed Description

Town data imported from JSON files and used to place towns.

Definition at line 353 of file genworld.cpp.

Field Documentation

◆ is_city

bool ExternalTownData::is_city

Should it be created as a city in OpenTTD? If input is blank, defaults to false.

Definition at line 357 of file genworld.cpp.

Referenced by LoadTownData(), and TryFoundTownNearby().

◆ name

std::string ExternalTownData::name

The name of the town.

Definition at line 355 of file genworld.cpp.

Referenced by LoadTownData(), and TryFoundTownNearby().

◆ population

uint ExternalTownData::population

The target population of the town when created in OpenTTD. If input is blank, defaults to 0.

Definition at line 356 of file genworld.cpp.

Referenced by LoadTownData().

◆ town_id

TownID ExternalTownData::town_id

The TownID of the town in OpenTTD. Not imported, but set during the founding proceess and stored here for convenience.

Definition at line 354 of file genworld.cpp.

Referenced by LoadTownData(), and TryFoundTownNearby().

◆ x_proportion

float ExternalTownData::x_proportion

The X coordinate of the town, as a proportion 0..1 of the maximum X coordinate.

Definition at line 358 of file genworld.cpp.

Referenced by LoadTownData().

◆ y_proportion

float ExternalTownData::y_proportion

The Y coordinate of the town, as a proportion 0..1 of the maximum Y coordinate.

Definition at line 359 of file genworld.cpp.

Referenced by LoadTownData().


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