Anonymous avatar Anonymous committed b2f9214

MAINT-922 FIX Client side code to catch the SCRIPT_PERMISSION_TELEPORT request from similator and display a notification
Reviewed by Simon

Comments (0)

Files changed (5)

indra/lscript/lscript_byteformat.h

 	SCRIPT_PERMISSION_CHANGE_PERMISSIONS,
 	SCRIPT_PERMISSION_TRACK_CAMERA,
 	SCRIPT_PERMISSION_CONTROL_CAMERA,
+	SCRIPT_PERMISSION_TELEPORT,
 	SCRIPT_PERMISSION_EOF
 } LSCRIPTRunTimePermissions;
 
 	(0x1 << 9),	//	SCRIPT_PERMISSION_CHANGE_PERMISSIONS
 	(0x1 << 10),//	SCRIPT_PERMISSION_TRACK_CAMERA
 	(0x1 << 11),//	SCRIPT_PERMISSION_CONTROL_CAMERA
+	(0x1 << 12),//	SCRIPT_PERMISSION_TELEPORT
 };
 
 // http_request string constants

indra/lscript/lscript_compile/indra.l

 "PERMISSION_CHANGE_JOINTS"		{ count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_JOINTS]; return(INTEGER_CONSTANT); }
 "PERMISSION_CHANGE_PERMISSIONS"	{ count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_PERMISSIONS]; return(INTEGER_CONSTANT); }
 "PERMISSION_TRACK_CAMERA"		{ count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TRACK_CAMERA]; return(INTEGER_CONSTANT); }
-"PERMISSION_CONTROL_CAMERA"			{ count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CONTROL_CAMERA]; return(INTEGER_CONSTANT); }
+"PERMISSION_CONTROL_CAMERA"		{ count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CONTROL_CAMERA]; return(INTEGER_CONSTANT); }
+"PERMISSION_TELEPORT"			{ count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TELEPORT]; return(INTEGER_CONSTANT); }
 
 "INVENTORY_TEXTURE"					{ count(); yylval.ival = LLAssetType::AT_TEXTURE; return(INTEGER_CONSTANT); }
 "INVENTORY_SOUND"					{ count(); yylval.ival = LLAssetType::AT_SOUND; return(INTEGER_CONSTANT); }

indra/newview/app_settings/keywords.ini

 # PERMISSION_CHANGE_PERMISSIONS Passed to llRequestPermissions library function to request permission to change permissions
 PERMISSION_TRACK_CAMERA			Passed to llRequestPermissions library function to request permission to track agent's camera
 PERMISSION_CONTROL_CAMERA		Passed to llRequestPermissions library function to request permission to change agent's camera
+PERMISSION_TELEPORT				Passed to llRequestPermissions library function to request permission to teleport agent
 
 DEBUG_CHANNEL		Chat channel reserved for debug and error messages from scripts
 PUBLIC_CHANNEL		Chat channel that broadcasts to all nearby users

indra/newview/llviewermessage.cpp

 		"AddAndRemoveJoints",
 		"ChangePermissions",
 		"TrackYourCamera",
-		"ControlYourCamera"
+		"ControlYourCamera",
+		"TeleportYourAgent"
 	};
 
 const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = 
 	FALSE,	// AddAndRemoveJoints
 	FALSE,	// ChangePermissions
 	FALSE,	// TrackYourCamera,
-	FALSE	// ControlYourCamera
+	FALSE,	// ControlYourCamera
+	FALSE	// TeleportYourAgent
 };
 
 bool friendship_offer_callback(const LLSD& notification, const LLSD& response)

indra/newview/skins/default/xui/en/strings.xml

 	<string name="AddAndRemoveJoints">Add and remove joints with other objects</string>
 	<string name="ChangePermissions">Change its permissions</string>
 	<string name="TrackYourCamera">Track your camera</string>
-	<string name="ControlYourCamera">Control your camera</string>
-	<string name="NotConnected">Not Connected</string>
+  <string name="ControlYourCamera">Control your camera</string>
+  <string name="TeleportYourAgent">Teleport you</string>
+  <string name="NotConnected">Not Connected</string>
 
 	<!-- Sim Access labels -->
 	<string name="SIM_ACCESS_PG">General</string>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.