From 5bdf2cac75a3365da7c70c201ee62b4e67f5fc49 Mon Sep 17 00:00:00 2001 From: wolfreak99 Date: Wed, 8 Feb 2017 13:05:50 -0500 Subject: [PATCH] Add permissions for MODIFY_TILE command --- data/language/en-GB.txt | 1 + src/openrct2/localisation/string_ids.h | 1 + src/openrct2/network/NetworkAction.cpp | 7 ++++++- src/openrct2/network/network.cpp | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index a525d5390c..ff9e06b484 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -4324,6 +4324,7 @@ STR_6012 :{COMMA1DP16} STR_6013 :{SMALLFONT}{BLACK}Guests will only pay the ticket to enter the park and services.{NEWLINE}Ride entry is free. STR_6014 :{SMALLFONT}{BLACK}Guests will only pay entrance tickets for rides and services.{NEWLINE}They won't pay anything to enter the park. STR_6015 :Sloped +STR_6016 :Modify Tile ############# # Scenarios # diff --git a/src/openrct2/localisation/string_ids.h b/src/openrct2/localisation/string_ids.h index 4bfa53f314..4452a11cff 100644 --- a/src/openrct2/localisation/string_ids.h +++ b/src/openrct2/localisation/string_ids.h @@ -3667,6 +3667,7 @@ enum { STR_RIDE_INCOME_ADMISSION_PAY_FOR_ENTRY_TIP = 6013, STR_ADMISSION_PRICE_PAY_PER_RIDE_TIP = 6014, STR_TILE_INSPECTOR_PATH_SLOPED = 6015, + STR_ACTION_MODIFY_TILE = 6016, // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 diff --git a/src/openrct2/network/NetworkAction.cpp b/src/openrct2/network/NetworkAction.cpp index 58cb00b9aa..a59d24d1e3 100644 --- a/src/openrct2/network/NetworkAction.cpp +++ b/src/openrct2/network/NetworkAction.cpp @@ -221,7 +221,12 @@ const std::vector NetworkActions::Actions = { MISC_COMMAND_PASSWORDLESS_LOGIN } - }, + }, { + STR_ACTION_MODIFY_TILE, "PERMISSION_MODIFY_TILE", + { + GAME_COMMAND_MODIFY_TILE + } + } }; #endif diff --git a/src/openrct2/network/network.cpp b/src/openrct2/network/network.cpp index 169377a174..5126514345 100644 --- a/src/openrct2/network/network.cpp +++ b/src/openrct2/network/network.cpp @@ -745,6 +745,7 @@ void Network::SetupDefaultGroups() user->ToggleActionPermission(16); // Modify Groups user->ToggleActionPermission(17); // Set Player Group user->ToggleActionPermission(18); // Cheat + user->ToggleActionPermission(21); // Modify Tile user->Id = 2; group_list.push_back(std::move(user)); SetDefaultGroup(1); @@ -786,6 +787,9 @@ void Network::LoadGroups() } json_decref(json); } + + // Host group should always contain all permissions. + group_list.at(0)->ActionsAllowed.fill(0xFF); } void Network::BeginChatLog()