From ca08bd5aba5e69fce3b0f5b4f861ffec9fe4d2e5 Mon Sep 17 00:00:00 2001 From: Cinder Date: Sun, 8 Feb 2015 12:53:39 -0700 Subject: OPEN-292 - Remove lscript from project, Remove legacy udp script upload methods, Refactor script runtime perms from three arrays to one struct array so we don't have to juggle array order anymore. --- indra/newview/llscriptruntimeperms.h | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 indra/newview/llscriptruntimeperms.h (limited to 'indra/newview/llscriptruntimeperms.h') diff --git a/indra/newview/llscriptruntimeperms.h b/indra/newview/llscriptruntimeperms.h new file mode 100644 index 0000000000..4a8e4288d2 --- /dev/null +++ b/indra/newview/llscriptruntimeperms.h @@ -0,0 +1,60 @@ +/** + * @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$ + */ + +#ifndef LL_LLSCRIPTRUNTIME_PERMS_H +#define LL_LLSCRIPTRUNTIME_PERMS_H + +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 = 16; +const S32 SCRIPT_PERMISSION_DEBIT = 0; + +static const boost::array 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) +}}; + +#endif // LL_LLSCRIPTRUNTIME_PERMS_H -- cgit v1.2.3 From 27fd7fdee6e80aa3520d5740d0197c64ad3837e9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 9 Mar 2016 12:21:34 +0100 Subject: More elegant solution to keep fix for MAINT-2879 --- indra/newview/llscriptruntimeperms.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llscriptruntimeperms.h') diff --git a/indra/newview/llscriptruntimeperms.h b/indra/newview/llscriptruntimeperms.h index 4a8e4288d2..51f57afdc9 100644 --- a/indra/newview/llscriptruntimeperms.h +++ b/indra/newview/llscriptruntimeperms.h @@ -27,6 +27,8 @@ #ifndef LL_LLSCRIPTRUNTIME_PERMS_H #define LL_LLSCRIPTRUNTIME_PERMS_H +#include + typedef struct _script_perm { std::string question; U32 permbit; @@ -37,6 +39,8 @@ typedef struct _script_perm { const U32 NUM_SCRIPT_PERMISSIONS = 16; const S32 SCRIPT_PERMISSION_DEBIT = 0; +const S32 SCRIPT_PERMISSION_TRIGGER_ANIMATION = 3; +const S32 SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS = 14; static const boost::array SCRIPT_PERMISSIONS = {{ _script_perm("ScriptTakeMoney", (0x1 << 1), true), -- cgit v1.2.3