-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding LinksetData to oc_core for dynamic menus #943
Conversation
Yosty7B3
commented
Apr 2, 2023
- All the settings are now read directly from the LinksetData instead of relying on link messages.
- Buttons can now be added and removed by directly editing the LinksetData OR through the old method of link_messages.
- The LinksetData keys used for the menu's are 'Menu_' followed by the name of the menu. So for Main that is "Menu_Main", and for Apps that is "Menu_Apps".
- The values are comma separated strings of the buttons.
- Weld has been removed mostly from oc_core in preparation of a separate oc_weld script.
* All the settings are now pulled directly from the LinksetData instead of relying on link messages. * Buttons can now be added and removed by directly editing the LinksetData OR through the old method of link_messages. * The LinksetData keys used for the menu's are 'Menu_' followed by the name of the menu. So for Main that is "Menu_Main", and for Apps that is "Menu_Apps". * The values are comma separated strings of the buttons. * Weld has been removed mostly from oc_core in preparation of a separate oc_weld script.
Replaces the functionality that Weld had before but in it's on script now. Using LinksetData instead of prim description for settings, which also allows the Weld button from being dynamically added and removed. Added global_hideweld flag to hides the Weld button (1=hide). Most weld dependencies in oc_settings should now be redundant and could be removed. Already removed (commented out) weld from oc_core in OpenCollarTeam#943
Replaces the functionality of Weld but in it's on script now (was spread between oc_core and oc_settings). Using LinksetData instead of prim description for settings, which also allows the Weld button from being dynamically added and removed. Added global_hideweld flag to hides the Weld button (1=hide). Most weld dependencies in oc_settings should now be redundant and could be removed. Already removed (commented out) weld from oc_core in OpenCollarTeam#943
Nice work here. Ties in with #944 and implements LSD functions. Likely to need some changes when we finalize the settings standards with LSD. |
your linkset_data() section has more work than is needed there is no reason for the script to have to store this information just call it where its needed, the only part of linkset_data() that is needed is the lock section detach call |
We could remove those but then we have to make sure the linksetdata is set to the right values for all of them. |
you are right on that i went over the script last night doing just that i am trying to convert the full core set to use LSD the ones that have a default value need to be set by the first script to boot or by the script that would naturally set them, so i came up with the following.
|
and yes in that i added 2 new values we only need one script to get and check the wearer key this reduces the redundency and if the key is wrong i have it clear linkset which should force a reset of every script if you have it set up. LINKSETDATA_RESET action. |
i forgot to add llLinksetDataWrite("global_firstrun",(string)true); under the first run check |
@tayaphidoux I think we should be looking to remove on attach restarts altogether, so we could be doing first run settings in state_entry |
Slightly OT but as it comes up in @tayaphidoux 's comments -- I strongly suggest we no longer use lists for trusted/owner/blacklist auth values. If we save users in the form token: auth_(uuid) value: iAuth we have a faster and more efficient auth process. |
instead of adding a firstrun token, we could also just revert back to the default value when a specific token doesn't exist.
|
@Yosty7B3 that looks better than what i wrote and is more flexible. @Medea-Destiny the reset i mentioned is not on worn its on key change and its on LSD Reset, in order to prepare the collar for a new user when its passed from one person to the next, not reset every script on wear, not that it matters if you put the important stuff in LSD, it means to reset the scripts all you need to do is erase all of LSD, a separate reset can be implemented for non destructive resets or soft_resets, destructive resets could be used to fix collars that are permalocked by malicious users using a separate script or in collar emergency button such as run away. |
@tayaphidoux If we're clearing LSD then we're effectively doing a "factory reset" and there's no reason not to reset all scripts. |
@Medea-Destiny so you would rather some one hand you a collar pre configured the way they want to controll you? and yes its a factory reset hence why the code below should exist in all linkset blocks, so that the scripts know to repopulate pre defined peramiters, this means the only time you need to reset the scripts are A) when some one clears memory, b) when you pass the collar from one person to the next to prevent passing maillisious/broken configurations.
|
@tayaphidoux "@Medea-Destiny so you would rather some one hand you a collar pre configured the way they want to controll you?" What? Were you thinking we wouldn't clear LSD on a changed owner? I have no idea what you're talking about here. |
@Medea-Destiny i am talking about doing just that, and encase a third party script wipes the data. |
A third party script could wipe all settings today just as easily. |