Files
Ansariel 54b7bd3685 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/cmake/Boost.cmake
#	indra/llxml/llcontrol.cpp
#	indra/newview/llcallingcard.cpp
#	indra/newview/lleventpoll.cpp
#	indra/newview/llviewermessage.cpp
#	indra/newview/skins/default/xui/en/notifications.xml
#	indra/newview/skins/default/xui/en/strings.xml
#	indra/newview/viewer_manifest.py
2026-01-19 10:50:32 +01:00

69 lines
2.8 KiB
C++

/**
* @file llscriptruntimeperms.h
* @brief Script runtime permission definitions
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2015, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#pragma once
typedef struct _script_perm {
std::string question;
U32 permbit;
bool caution;
_script_perm(const std::string& q, const U32 b, const bool c) :
question(q), permbit(b), caution(c) {}
} script_perm_t;
const U32 NUM_SCRIPT_PERMISSIONS = 19;
const S32 SCRIPT_PERMISSION_DEBIT = 0;
const S32 SCRIPT_PERMISSION_TRIGGER_ANIMATION = 3;
const S32 SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS = 14;
// <FS:Ansariel> Also required indexes
const S32 SCRIPT_PERMISSION_TAKE_CONTROLS = 1;
const S32 SCRIPT_PERMISSION_ATTACH = 4;
const S32 SCRIPT_PERMISSION_TELEPORT = 11;
// </FS:Ansariel>
static const std::array<script_perm_t, NUM_SCRIPT_PERMISSIONS> SCRIPT_PERMISSIONS = {{
_script_perm("ScriptTakeMoney", (0x1 << 1), true),
_script_perm("ActOnControlInputs", (0x1 << 2), false),
_script_perm("RemapControlInputs", (0x1 << 3), false),
_script_perm("AnimateYourAvatar", (0x1 << 4), false),
_script_perm("AttachToYourAvatar", (0x1 << 5), false),
_script_perm("ReleaseOwnership", (0x1 << 6), false),
_script_perm("LinkAndDelink", (0x1 << 7), false),
_script_perm("AddAndRemoveJoints", (0x1 << 8), false),
_script_perm("ChangePermissions", (0x1 << 9), false),
_script_perm("TrackYourCamera", (0x1 << 10), false),
_script_perm("ControlYourCamera", (0x1 << 11), false),
_script_perm("TeleportYourAgent", (0x1 << 12), false),
_script_perm("JoinAnExperience", (0x1 << 13), false),
_script_perm("SilentlyManageEstateAccess", (0x1 << 14), false),
_script_perm("OverrideYourAnimations", (0x1 << 15), false),
_script_perm("ScriptReturnObjects", (0x1 << 16), false),
_script_perm("ForceSitAvatar", (0x1 << 17), false),
_script_perm("ChangeEnvSettings", (0x1 << 18), false),
_script_perm("PrivilegedLandAccess",(0x1 << 19), true)
} };