|
OpenTTD Source
14.0-beta1
|
12 #ifndef NETWORK_CORE_GAME_INFO_H
13 #define NETWORK_CORE_GAME_INFO_H
17 #include "../../newgrf_config.h"
18 #include "../../timer/timer_game_calendar.h"
19 #include "../../timer/timer_game_tick.h"
21 #include <unordered_map>
86 enum NewGRFSerializationType {
88 NST_GRFID_MD5_NAME = 1,
135 typedef std::unordered_map<uint32_t, NamedGRFIdentifier> GameInfoNewGRFLookupTable;
139 std::string_view GetNetworkRevisionString();
140 bool IsNetworkCompatibleVersion(std::string_view other);
143 void FillStaticNetworkServerGameInfo();
150 void DeserializeNetworkGameInfo(
Packet *p,
NetworkGameInfo *info,
const GameInfoNewGRFLookupTable *newgrf_lookup_table =
nullptr);
int gamescript_version
Version of the gamescript.
The game information that is sent from the server to the clients with extra information only required...
std::string gamescript_name
Name of the gamescript.
std::string server_revision
The version number the server is using (e.g.: 'r304' or 0.5.0)
byte clients_max
Max clients allowed on server.
std::string name
The name of the NewGRF.
The game information that is sent from the server to the client.
GRFIdentifier ident
The unique identifier of the NewGRF.
Templated helper to make a type-safe 'typedef' representing a single POD value.
uint64_t TickCounter
The type that the tick counter is stored in.
bool version_compatible
Can we connect to this server or not? (based on server_revision)
Basic data to distinguish a GRF.
Information about GRF, used in the game and (part of it) in savegames.
uint16_t map_height
Map height.
byte companies_on
How many started companies do we have.
byte companies_max
Max companies allowed on server.
Internal entity of a packet.
bool dedicated
Is this a dedicated server?
bool use_password
Is this server passworded?
TimerGameCalendar::Date calendar_date
Current calendar date.
uint16_t map_width
Map width.
byte spectators_on
How many spectators do we have?
byte landscape
The used landscape.
std::string server_name
Server name.
byte clients_on
Current count of clients on server.
GRFConfig * grfconfig
List of NewGRF files used.
TimerGameCalendar::Date calendar_start
When the game started.
Container to hold the GRF identifier (GRF ID + MD5 checksum) and the name associated with that NewGRF...
bool compatible
Can we connect to this server or not? (based on server_revision and grf_match.
TimerGameTick::TickCounter ticks_playing
Amount of ticks the game has been running unpaused.