aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--onefang's_utilities.lsl16
1 files changed, 8 insertions, 8 deletions
diff --git a/onefang's_utilities.lsl b/onefang's_utilities.lsl
index 010ce7f..04081c5 100644
--- a/onefang's_utilities.lsl
+++ b/onefang's_utilities.lsl
@@ -1148,20 +1148,20 @@ default
1148 key id = llDetectedKey(i); 1148 key id = llDetectedKey(i);
1149 string desc = llList2String(llGetObjectDetails(llGetLinkKey(llDetectedLinkNumber(i)), [OBJECT_DESC]), 0); 1149 string desc = llList2String(llGetObjectDetails(llGetLinkKey(llDetectedLinkNumber(i)), [OBJECT_DESC]), 0);
1150 1150
1151 // If there's a description, then it's likely a scriptlet. 1151 // NOTE - You can't have a scriptlet and a menu, doesn't make sense anyway.
1152 // TODO - need a new way to do this, ANY description makes menus not work. 1152 if (1 == length) // Only one registered, select it directly.
1153 if (("" != desc) && (" " != desc))
1154 myListen(0, llKey2Name(id), id, desc); // TODO - the problem here is that the first argument is a channel,
1155 // and we don't know which channel to fake.
1156 // Maybe use the debug channel as a wildcard?
1157 else if (1 == length) // Only one registered, select it directly.
1158 { 1153 {
1159 llMessageLinked(LINK_SET, UTILITIES_MENU_DONE, llDumpList2String([id, ""], LIST_SEP), 1154 llMessageLinked(LINK_SET, UTILITIES_MENU_DONE, llDumpList2String([id, ""], LIST_SEP),
1160 llList2String(llParseStringKeepNulls(llList2String(registeredMenus, 0), ["|"], []), 2)); 1155 llList2String(llParseStringKeepNulls(llList2String(registeredMenus, 0), ["|"], []), 2));
1161 } 1156 }
1162 else if (0 != length) // More than one, put up a menu of them. 1157 else if (0 != length) // More than one, put up a menu of them.
1163 startMenu(NULL_KEY, [id, INVENTORY_NONE, "Choose a function :"] + registeredMenus); 1158 startMenu(NULL_KEY, [id, INVENTORY_NONE, "Choose a function :"] + registeredMenus);
1164 // If there's zero registered menus, then do nothing. 1159 // If there's a description, then it's likely a scriptlet.
1160 else if (("" != desc) && (" " != desc))
1161 myListen(0, llKey2Name(id), id, desc); // TODO - the problem here is that the first argument is a channel,
1162 // and we don't know which channel to fake.
1163 // Maybe use the debug channel as a wildcard?
1164 // If there's zero registered menus, and not a scriptlet, then do nothing.
1165 } 1165 }
1166 } 1166 }
1167 1167