feat: non-breaking SSS rework for the third time 😭 #555
Closed
Someone-193 wants to merge 6 commits into
Closed
Conversation
I think it all works, I ran server and no errors, I got on and ended round and no errors
I think these work
Try merge dev
Collaborator
Author
|
ok so I found out today that this PR breaks existing plugins that don't use SettingBase.Register(); (at least Exiled will override it n stuff), I guess that's the price to pay for usable SSS. This PR would break the other way as well, SettingGroups intended for a particular player n stuff will be shown to all if ServerSpecificSettingSync.SendToAll(); is called |
Collaborator
Author
|
I made a LabAPI plugin for SSS which is better than this PR, so it's best to just ignore this until we can rework SSS next major release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Describe the changes
I hate the fact I'm typing this up again, but this PR obsoletes old Exiled SSS concepts like grouping settings by header, and SettingBase.SyncOnJoin. It replaces these concepts with a new class SettingGroup that groups together settings by however a developer wants to, as well as controlling the groups priority when being sent to clients (higher priority groups are higher on the clients list) and letting developer controls who sees which groups via a Predicate in SettingGroup. SettingGroups can also contain more SettingGroups under them recursively so you can stack and arrange your settings list however you'd like. In terms of how it reworks old stuff, it just registers and unregisters settings to a static SettingGroup called ObsoleteGroup.
What is the current behavior? (You can also link to an open issue here)
Exiled SSS mid
What is the new behavior? (if this is a feature change)
Exiled SSS not mid
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
nuh uh
Other information:
If you'd like to verify that this PR is non breaking, try to get the most complicated SSS thing you can get and run it on this PR. If anything breaks in actual dll, lmk
Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Other