1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-14 10:09:11 +00:00

Codechange: allow certain enumeration to be added

Otherwise C++20 doesn't like it.
This commit is contained in:
Rubidium
2024-01-16 22:01:28 +01:00
committed by rubidium42
parent 7737aa6640
commit aa5ba5bd7f
21 changed files with 83 additions and 63 deletions

View File

@@ -10,6 +10,8 @@
#ifndef NETWORK_TYPE_H
#define NETWORK_TYPE_H
#include "../core/enum_type.hpp"
/** How many clients can we have */
static const uint MAX_CLIENTS = 255;
@@ -86,11 +88,12 @@ enum NetworkPasswordType {
* Destination of our chat messages.
* @warning The values of the enum items are part of the admin network API. Only append at the end.
*/
enum DestType {
enum DestType : byte {
DESTTYPE_BROADCAST, ///< Send message/notice to all clients (All)
DESTTYPE_TEAM, ///< Send message/notice to everyone playing the same company (Team)
DESTTYPE_CLIENT, ///< Send message/notice to only a certain client (Private)
};
DECLARE_ENUM_AS_ADDABLE(DestType)
/**
* Actions that can be used for NetworkTextMessage.