-
Notifications
You must be signed in to change notification settings - Fork 167
Storage Module Update + Action History (.json use / no dependencies) #910
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
base: master
Are you sure you want to change the base?
Conversation
… dependencies using a .json file
…story display format
…(BAN, KICK, WARN, UNBAN) across the action history
|
Very open to suggestions / additions, somewhat in early stages |
…ntly, regardless of action history setting
…ved clarity and performance
|
@Blumlaut Is this use of storage.lua more along the lines of what you were thinking? |
…functions for improved organization
i'll have to review the code in detail when i have more time but glancing over it thats about what i was thinking of, i'm just wondering how to best make this work with plugins, i wonder if we should just let them overwrite the Edit: Maybe instead of letting them overwrite the storage entity introduce something like with plugins and have a storage backend convar that people can set, this would also allow us to merge additional storage backends without having to overwrite the default |
|
Would it be worth removing the custom banlist convar in favour of this updated storage system or should the function still check for it for backwards compatibility |
Good question, it hasn't been officially supported (or documented..) for years now, i'm not sure if it works any more even. I'd probably drop it altogether and force people to migrate to the new system. |
…ction history management
…methods and action logging
|
Ban system completely overhauled with new system, commented at points throughout banlist.lua just to make my ideas clear. At the moment, no old code is deleted, rather commented out to ensure nothing is missed. Small thing with this storage module, the performBanlistUpgrades() might not work as expected, I'll have to try it out once I get back to my PC |
Co-authored-by: blumlaut <13604413+Blumlaut@users.noreply.github.com>
Co-authored-by: blumlaut <13604413+Blumlaut@users.noreply.github.com>
Co-authored-by: blumlaut <13604413+Blumlaut@users.noreply.github.com>
Co-authored-by: blumlaut <13604413+Blumlaut@users.noreply.github.com>
…gui_c.lua banlist menu item)
…ove expired actions
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I've also gone through all of Copilot's suggestions, some of it was beneficial, the unresolved ones are ones I'm not 100% sure about whether it would impact |
|
|
||
| local function LoadList(fileName) | ||
| local content = LoadResourceFile(GetCurrentResourceName(), fileName .. ".json") | ||
| local currentVersion = GetConvar("$ea_storageAPIVersion", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not quite what i meant.
I was more thinking of
https://docs.fivem.net/natives/?_0x964BAB1D
see:
EasyAdmin/shared/util_shared.lua
Lines 195 to 198 in b81a223
| function GetVersion() | |
| local resourceName = GetCurrentResourceName() | |
| local version = GetResourceMetadata(resourceName, 'version', 0) | |
| local is_master = GetResourceMetadata(resourceName, 'is_master', 0) == "yes" or false |
Future Considerations: