mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier. I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
/*****************************************************************************
|
|
* Copyright (c) 2014-2018 OpenRCT2 developers
|
|
*
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
*
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
*****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <jansson.h>
|
|
#include <string>
|
|
#include "NetworkPacket.h"
|
|
#include "../common.h"
|
|
|
|
class NetworkGroup final
|
|
{
|
|
public:
|
|
std::array<uint8, 8> ActionsAllowed{};
|
|
uint8 Id = 0;
|
|
|
|
static NetworkGroup FromJson(const json_t * json);
|
|
|
|
const std::string & GetName() const;
|
|
void SetName(std::string name);
|
|
|
|
void Read(NetworkPacket &packet);
|
|
void Write(NetworkPacket &packet);
|
|
void ToggleActionPermission(size_t index);
|
|
bool CanPerformAction(size_t index) const;
|
|
bool CanPerformCommand(sint32 command) const;
|
|
|
|
json_t * ToJson() const;
|
|
|
|
private:
|
|
std::string _name;
|
|
};
|