mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 03:53:07 +01:00
Fix missing include and guard functions with network macro
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
|
||||
# include "../../../Cheats.h"
|
||||
# include "../../Duktape.hpp"
|
||||
# include "../../ScriptEngine.h"
|
||||
# include "Duktape.hpp"
|
||||
|
||||
namespace OpenRCT2::Scripting
|
||||
{
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace OpenRCT2::Scripting
|
||||
# endif
|
||||
}
|
||||
|
||||
# ifndef DISABLE_NETWORK
|
||||
static std::string TransformPermissionKeyToJS(const std::string& s)
|
||||
{
|
||||
auto result = s.substr(sizeof("PERMISSION_") - 1);
|
||||
@@ -60,6 +61,17 @@ namespace OpenRCT2::Scripting
|
||||
return result;
|
||||
}
|
||||
|
||||
static std::string TransformPermissionKeyToInternal(const std::string& s)
|
||||
{
|
||||
auto result = "PERMISSION_" + s;
|
||||
for (auto& c : result)
|
||||
{
|
||||
c = std::toupper(c);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
# endif
|
||||
|
||||
std::vector<std::string> ScPlayerGroup::permissions_get() const
|
||||
{
|
||||
# ifndef DISABLE_NETWORK
|
||||
@@ -84,16 +96,6 @@ namespace OpenRCT2::Scripting
|
||||
# endif
|
||||
}
|
||||
|
||||
static std::string TransformPermissionKeyToInternal(const std::string& s)
|
||||
{
|
||||
auto result = "PERMISSION_" + s;
|
||||
for (auto& c : result)
|
||||
{
|
||||
c = std::toupper(c);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void ScPlayerGroup::permissions_set(std::vector<std::string> value)
|
||||
{
|
||||
# ifndef DISABLE_NETWORK
|
||||
|
||||
Reference in New Issue
Block a user