Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Conversation

@Someone-193
Copy link

Description

Describe the changes
SSS PR IS BACK BABY WOOOOOOOOOO πŸ€‘ πŸ€‘ πŸ”₯ πŸ”₯ πŸ’Ή πŸ“ˆ πŸ—£οΈ πŸ—£οΈ πŸ—£οΈ

Added SettingGroup class to hold multiple SettingBase to be grouped together when displayed, as well as adding to said SettingGroups: Viewers (a predicate to determine who can see the SettingGroup on SettingBase.SendToPlayer()) Priority (an integer to use to sort the SettingGroups in SendToPlayer) and SubGroups (Other SettingGroups that may wish to be attached to the original SettingGroup)
What is the current behavior? (You can also link to an open issue here)
EXILED's SSS implementation is mid, no player specific settings, no priority for groups of settings, etc...

What is the new behavior? (if this is a feature change)
See "Describe the changes"

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No

Other information:
This has been tested a lot by me personally, but if anybody has ideas for new features, feel free to comment about em.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

Someone-193 and others added 22 commits April 11, 2025 20:12
Only bad thing about this is the fact that the constructor for most settings is now ambiguous unless you specified every input. (not breaking tho πŸ’° πŸ’° πŸ’° πŸ’° )
Removed default values from obsolete constructors, making the Ambiguous constructor reference error impossible. Added a SubGroups property to SettingGroup to handle recursive groups of settings. SubGroups defaults to null but I made sure to check it in them methods that call it. Notably SettingGroup::GetAllSettings(); that recursively gets all the SettingBase contained within it. I added checks for recursive stuff and an error for it. I also added SettingGroup::GetViewableSettingsOrdered(Player) that gets all the settings viewable by a specified player as well as ordered by priority etc...
some last minute tweaks including fixing the List<> renting I was doing
Legit realized my recursive check didn't work last night right before I went to bed 😭

This ought to fix it though
…Settings, Add an IReadOnlyCollection of Groups

if a plugin-maker manually removes a ServerSpecificSettingsBase from ServerSpecificSettingsSync.DefinedSettings, it's on them to handle who gets what settings, otherwise making this check simply reduces points of failure
Forgor to check predicate :(
yknow, I really though that checking DefinedSettings for the setting bases before sending them was a good idea, but SOMEHOW SettingBase::Base doesn't return the value stored in ServerSpecificSettingSync.DefinedSettings!?!?!? 😭

Anyways, removed that, added a specified group for the obsolete methods to register into, then made all SettingBase non-group register/unregister method reference that group. Only way this breaks is if some goofy goobers plugin unregisters all settings, clients would see stuff created via group method, but that's why we obsolete stuff, it doesn't affect pre-change behavior so as long as devs have a few brain cells (crazy request ik) we should be good
as far as I can tell this shouldn't mess with the recursive check but make it more accurate. But now you can have multiple of the same group in SubGroups if you'd like (without them being recursive ofc)
@github-actions github-actions bot added API Extra attention is needed Events This doesn't seem right labels May 26, 2025
@Someone-193 Someone-193 closed this by deleting the head repository Jun 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

API Extra attention is needed Events This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants