Wednesday, May 7, 2014

Final additions

The lock has seen a few minor code changes.

Self-owners who timelock themselves will no longer have access to add new owners while they're timelocked. This means that for the self-bondage player who doesn't want to be pestered by random strangers, they can self-own their attachments, and use the timelocks for extended endurance play. Non-timelocked but locked self-owners will have full access to the menus.

The person who last locked your attachments, and the person who last activated your timelock, or modified the time on your timelocks, will be notified when you are released. This applies to owners as well. The lock(s) will support up to 9 owners, but to cut down on spam, and keep the scripts as fast as possible, only the one who locked you, and the one who timelocked you will be notified. Only one IM will be sent if they're the same person.

Most mode-change notifications have been changed from using the private 'llOwnerSay' message command, to now using llWhisper which can be heard by anyone in a 10m radius. This change does make the script more noticeable to others in public areas, but it reduces the number of messages that need to be sent to notify the wearer, menu user triggering the mode change, and any owners, last lockers, and so-on standing in the area. The messages involved are limited, and happen infrequently, but include things like "your hood was unlocked after 5 minutes" or "your timelock was changed, and is now set for 3 hours".

Personally, I prefer that "Silent" behaviour, anything that reduces the amount of object chat spam is a good thing. But in this case, I think it's reasonably desirable to have it say "Your shoes were locked on" when they get locked. It appeals to that little part of me that's an exhibitionist, and in this case, it's just the easiest way to notify the wearer and the menu user that the intended function executed.. and if it feeds a little blush-factor for the sub at the same time, then all the better.

The only function I am considering adding at this point, is a small command to automatically load plugin menu buttons. While they're easy to add manually, a part of me REALLY would like that function to be automatic, which would allow end-users to mix and match plugins without requiring me to custom modify the lock scripts for them.

The following code should do the trick, assuming a plugin script was named "plugin-Gag", it should automatically add a button named "Gag". Though it's questionable whether it's the most memory efficient way to format the code.

integer i;
for (i  = 0; i < llGetInventoryNumber(INVENTORY_SCRIPT); i++)
{
     string scriptName = llGetInventoryName(INVENTORY_SCRIPT, i);
     if (llSubStringIndex(scriptName, "plugin-") != -1) buttons += llDeleteSubString(scriptName, 0, llSubStringIndex(scriptName, "-"));
}

No comments:

Post a Comment