83 NETWORK_ACTION_SERVER_MESSAGE,
85 NETWORK_ACTION_CHAT_COMPANY,
86 NETWORK_ACTION_CHAT_CLIENT,
87 NETWORK_ACTION_GIVE_MONEY,
88 NETWORK_ACTION_NAME_CHANGE,
89 NETWORK_ACTION_COMPANY_SPECTATOR,
90 NETWORK_ACTION_COMPANY_JOIN,
91 NETWORK_ACTION_COMPANY_NEW,
92 NETWORK_ACTION_KICKED,
93 NETWORK_ACTION_EXTERNAL_CHAT,
138 bool Contains(std::string_view key)
const;
139 bool Add(std::string_view key);
140 bool Remove(std::string_view key);
A sort-of mixin that implements 'at(pos)' and 'operator[](pos)' only for a specific enum class.
Simple helper to (more easily) manage authorized keys.
bool Contains(std::string_view key) const
Check whether the given key is contains in these authorized keys.
bool Add(std::string_view key)
Add the given key to the authorized keys, when it is not already contained.
bool Remove(std::string_view key)
Remove the given key from the authorized keys, when it is exists.
Type (helpers) for enums.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
#define DECLARE_ENUM_AS_ADDABLE(EnumType)
Operator that allows this enumeration to be added to any other enumeration.
NetworkVehicleType
Vehicletypes in the order they are send in info packets.
@ Bus
A road vehicle that stops at bus stops.
@ Truck
A road vehicle that stops at truck stops.
@ End
End marker for array sizes.
DestType
Destination of our chat messages.
@ DESTTYPE_CLIENT
Send message/notice to only a certain client (Private).
@ DESTTYPE_TEAM
Send message/notice to everyone playing the same company (Team).
@ DESTTYPE_BROADCAST
Send message/notice to all clients (All).
PoolID< uint8_t, struct AdminIDTag, 16, 0xFF > AdminID
Indices into the admin tables.
NetworkErrorCode
The error codes we send around in the protocols.
@ WrongRevision
The client is using the wrong revision.
@ General
Fallback error code in case nothing matches.
@ Desync
Client tells that they desynced.
@ SavegameFailed
Client tells they could not load the savegame.
@ Cheater
The client is trying control companies in a way they are not supposed to.
@ TimeoutPassword
The client has timed out providing a password.
@ TooManyCommands
The client has sent too many commands in a short time.
@ TimeoutComputer
The client has timed out because the computer could not keep up with the server.
@ TimeoutMap
The client has timed out because it took too long to download the map.
@ NotAuthorized
The client tried to do something there are not authorized to.
@ ServerFull
The server is full.
@ InvalidClientName
The client tried to set an invalid name.
@ TimeoutJoin
The client has timed out because getting up to speed with the server failed.
@ NotOnAllowList
The client is not on the allow list.
@ WrongPassword
The client entered a wrong password.
@ NotExpected
The request/packet was not expected in the current state.
@ Kicked
The client got kicked.
@ ConnectionLost
Connection to the client was lost.
@ IllegalPacket
A packet was received that has invalid content.
@ NameInUse
The client has a duplicate name (and we couldn't make it unique).
@ NoAuthenticationMethodAvailable
The client and server could not find a common authentication method.
@ CompanyMismatch
The client was impersonating another company.
@ NewGRFMismatch
Client does not have the right NewGRFs.
NetworkAction
Actions that can be used for NetworkTextMessage.
static const uint MAX_CLIENTS
How many clients can we have.
ClientID
'Unique' identifier to be given to clients
@ INVALID_CLIENT_ID
Client is not part of anything.
@ CLIENT_ID_SERVER
Servers always have this ID.
@ CLIENT_ID_FIRST
The first client ID.
ServerGameType
Game type the server can be using.
@ Public
The game is publicly accessible.
@ Local
Do not communicate with the game coordinator.
@ InviteOnly
The game can be accessed if you know the invite code.
PoolID< uint16_t, struct ClientPoolIDTag, MAX_CLIENTS+1, 0xFFFF > ClientPoolID
Indices into the client related pools.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Aircraft, helicopters, rotors and their shadows belong to this class.
Container for all information known about a client.
Simple calculated statistics of a company.
EnumClassIndexContainer< std::array< uint16_t, to_underlying(NetworkVehicleType::End)>, NetworkVehicleType > NetworkVehicleTypeArray
Array indexed by NetworkVehicleType.
NetworkVehicleTypeArray num_station
How many stations are there of this type?
NetworkVehicleTypeArray num_vehicle
How many vehicles are there of this type?
Templated helper to make a PoolID a single POD value.
All ships have this type.
'Train' is either a loco or a wagon.