46 constexpr void SetIndex(
SourceID index) { this->
id = index; }
49 constexpr bool IsValid() const noexcept {
return this->
id !=
Source::Invalid; }
50 auto operator<=>(
const Source &source)
const =
default;
Types related to companies.
A type is considered 'convertible through base()' when it has a 'base()' function that returns someth...
Types related to the industry.
uint16_t SourceID
Contains either industry ID, town ID or company ID (or Source::Invalid)
SourceType
Types of cargo source and destination.
@ Industry
Source/destination is an industry.
@ Headquarters
Source/destination are company headquarters.
@ Town
Source/destination is a town.
Defines the internal data of a functional industry.
A location from where cargo can come from (or go to).
static constexpr SourceID Invalid
Invalid/unknown index of source.
SourceID id
Index of industry/town/HQ, Source::Invalid if unknown/invalid.
SourceType type
Type of source_id.