OpenTTD Source 20250220-master-gf89924a727
source_type.h File Reference

Type for the source of cargo. More...

#include "company_type.h"
#include "industry_type.h"
#include "town_type.h"

Go to the source code of this file.

Data Structures

struct  Source
 A location from where cargo can come from (or go to). More...
 

Typedefs

using SourceID = uint16_t
 Contains either industry ID, town ID or company ID (or Source::Invalid)
 

Enumerations

enum class  SourceType : uint8_t { Industry = 0 , Town = 1 , Headquarters = 2 }
 Types of cargo source and destination. More...
 

Detailed Description

Type for the source of cargo.

Definition in file source_type.h.

Typedef Documentation

◆ SourceID

using SourceID = uint16_t

Contains either industry ID, town ID or company ID (or Source::Invalid)

Definition at line 24 of file source_type.h.

Enumeration Type Documentation

◆ SourceType

enum class SourceType : uint8_t
strong

Types of cargo source and destination.

Enumerator
Industry 

Source/destination is an industry.

Town 

Source/destination is a town.

Headquarters 

Source/destination are company headquarters.

Definition at line 18 of file source_type.h.