1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Add permissions for MODIFY_TILE command

This commit is contained in:
wolfreak99
2017-02-08 13:05:50 -05:00
committed by Michał Janiszewski
parent bee43fc78d
commit 5bdf2cac75
4 changed files with 12 additions and 1 deletions

View File

@@ -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

View File

@@ -221,7 +221,12 @@ const std::vector<NetworkAction> NetworkActions::Actions =
{
MISC_COMMAND_PASSWORDLESS_LOGIN
}
},
}, {
STR_ACTION_MODIFY_TILE, "PERMISSION_MODIFY_TILE",
{
GAME_COMMAND_MODIFY_TILE
}
}
};
#endif

View File

@@ -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()