10#ifndef NETWORK_CORE_TCP_CONTENT_TYPE_H
11#define NETWORK_CORE_TCP_CONTENT_TYPE_H
13#include "../../3rdparty/md5/md5.h"
All data/functions related with replacing the base graphics.
All data/functions related with replacing the base music.
All data/functions related with replacing the base sounds.
#define DECLARE_INCREMENT_DECREMENT_OPERATORS(enum_type)
For some enums it is useful to have pre/post increment/decrement operators.
std::vector< std::string > StringList
Type for a list of strings.
Container for all important information about a piece of content.
uint32_t unique_id
Unique ID; either GRF ID or shortname.
bool IsValid() const
Is the information from this content info valid?
uint32_t filesize
Size of the file.
MD5Hash md5sum
The MD5 checksum.
std::string url
URL related to the content.
State state
Whether the content info is selected (for download).
std::string name
Name of the content.
std::string description
Description of the content.
std::string version
Version of the content.
std::string filename
Filename (for the .tar.gz; only valid on download).
bool IsSelected() const
Is the state either selected or autoselected?
ContentType type
Type of content.
std::vector< ContentID > dependencies
The dependencies (unique server side ids).
State
The state the content can be in.
@ Unselected
The content has not been selected.
StringList tags
Tags associated with the content.
bool upgrade
This item is an upgrade.
uint32_t ContentID
Unique identifier for the content.
ContentType
The values in the enum are important; they are received over the network from the content servers.
@ Begin
Helper to mark the begin of the types.
@ Invalid
Invalid/uninitialized content.
@ GsLibrary
The content consists of a GS library.
@ Scenario
The content consists of a scenario.
@ Heightmap
The content consists of a heightmap.
@ Ai
The content consists of an AI.
@ End
Helper to mark the end of the types.
@ Gs
The content consists of a game script.
@ NewGRF
The content consists of a NewGRF.
@ AiLibrary
The content consists of an AI library.
static constexpr ContentID INVALID_CONTENT_ID
Sentinel for invalid content.
EnumBitSet< ContentType, uint16_t, ContentType::End > ContentTypes
Bitset of chosen content types.
std::optional< std::string > GetTextfile(TextfileType type, Subdirectory dir, std::string_view filename)
Search a textfile file next to the given content.
Types related to textfiles.
TextfileType
Additional text files accompanying Tar archives.