From 70b737145e018657a1fb662335562f7702df43bf Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sat, 2 Sep 2017 16:35:46 +0200 Subject: [PATCH] Allow "*" as pose name to mean all poses. Suggested by Natsagan in the Unofficial AVsitter group. --- AVsitter2/Plugins/AVcontrol/LockGuard/[AV]LockGuard.lsl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AVsitter2/Plugins/AVcontrol/LockGuard/[AV]LockGuard.lsl b/AVsitter2/Plugins/AVcontrol/LockGuard/[AV]LockGuard.lsl index 51d3781..da4c0c0 100644 --- a/AVsitter2/Plugins/AVcontrol/LockGuard/[AV]LockGuard.lsl +++ b/AVsitter2/Plugins/AVcontrol/LockGuard/[AV]LockGuard.lsl @@ -47,6 +47,7 @@ integer USES_PROPS = FALSE; // for a list of LockGuard V2 Standard ID Tags and more information. The LockGuard package // (with full instructions for the protocol) can be obtained in-world from Lillani Lowell's // inworld location. +// - A pose name of "*" provides a default for all poses, should that be necessary. list POSES = [ "Pose1", "leftwrist,ring1,rightwrist,ring2,leftankle,ring3,rightankle,ring4", @@ -72,6 +73,7 @@ integer comm_handle; key avatar; list links; list ring_prims; +integer all_poses = -2; // cache the position of the "*" if it exists, for performance goChain(list new_links) { @@ -169,6 +171,12 @@ default list new_links; integer pose_index = llListFindList(POSES, [POSE_NAME]); + if (!~pose_index) + { + if (all_poses == -2) + all_poses = llListFindList(POSES, (list)"*"); + pose_index = all_poses; + } if (~pose_index) { new_links = llCSV2List(llList2String(POSES, pose_index + 1));