Skip to content
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

Improve compatibility with SMLHelper by unpatching options and fixing exceptions #405

Merged

Conversation

LeeTwentyThree
Copy link
Member

Changes made in this pull request

  • Made all ModOptionAdjust classes internal rather than private
  • Added the SMLHelperCompatibilityPatcher class
    • Currently only used for fixing mod options bugs, but can be expanded
    • Fixes runtime exceptions by the ModOptionAdjust classes because SMLHelper is referencing a class that was removed from Subnautica. The fix is simply adding the Nautilus components rather than the old SMLHelper ones.
    • Unpatches SEVERAL SMLHelper options methods to ensure compatibility and that Nautilus applies the newer patches.

Breaking changes

  • None

@LeeTwentyThree LeeTwentyThree changed the title Unpatch sml options Improve compatibility with SMLHelper by unpatching options and minimizing exceptions Jun 12, 2023
@LeeTwentyThree LeeTwentyThree changed the title Improve compatibility with SMLHelper by unpatching options and minimizing exceptions Improve compatibility with SMLHelper by unpatching options and fixing exceptions Jun 12, 2023
Copy link
Contributor

@jonahnm jonahnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this, I'd recommend just making SMLHelper incompatible.

@LeeTwentyThree
Copy link
Member Author

LeeTwentyThree commented Jun 12, 2023

Instead of doing this, I'd recommend just making SMLHelper incompatible.

It's not that simple sadly. It probably won't be received well to declare a library that "works" as incompatible, killing loads of mods yet again and backtracking on what we said. Will only lead to confusion and disappointment. As far as I'm aware I can only think of 1 more big incompatibility issue, which is the item tooltips.

I'm aware the code isn't pretty though.

@LeeTwentyThree LeeTwentyThree linked an issue Jun 12, 2023 that may be closed by this pull request
@jonahnm
Copy link
Contributor

jonahnm commented Jun 12, 2023

Instead of doing this, I'd recommend just making SMLHelper incompatible.

SMLHelper is rendered obsolete by this. Make SMLHelper ONLY for legacy, but everything 2.0 Nautilus, and if people refuse to update from the one beta SMLHelper for 2.0, then let them deal with incompatibilities, we shouldn't be making something compatible with an obsolete library where there is only one release for the current version of Subnautica.

@jonahnm
Copy link
Contributor

jonahnm commented Jun 12, 2023

Instead of doing this, I'd recommend just making SMLHelper incompatible.

It's not that simple sadly. It probably won't be received well to declare a library that "works" as incompatible, killing loads of mods yet again and backtracking on what we said. Will only lead to confusion and disappointment. As far as I'm aware I can only think of 1 more big incompatibility issue, which is the item tooltips.

I'm aware the code isn't pretty though.

What do you mean killing loads of mods? There is only one release of SMLHelper for 2.0, and it was considered an alpha release.

@jonahnm
Copy link
Contributor

jonahnm commented Jun 12, 2023

It's sort of a rule of thumb in the programming world that alpha releases are considered not supported.

@LeeTwentyThree
Copy link
Member Author

LeeTwentyThree commented Jun 12, 2023

Instead of doing this, I'd recommend just making SMLHelper incompatible.

It's not that simple sadly. It probably won't be received well to declare a library that "works" as incompatible, killing loads of mods yet again and backtracking on what we said. Will only lead to confusion and disappointment. As far as I'm aware I can only think of 1 more big incompatibility issue, which is the item tooltips.
I'm aware the code isn't pretty though.

What do you mean killing loads of mods? There is only one release of SMLHelper for 2.0, and it was considered an alpha release.

I mean that there are mods that depend on SMLHelper for 2.0. I think the majority do.

@LeeTwentyThree
Copy link
Member Author

LeeTwentyThree commented Jun 12, 2023

SMLHelper is definitely no longer supported, but that doesn’t mean we need to have another massive breaking change when the compatibility issues are countable on one finger. People will use Nautilus because it is preferable. And if they don’t prefer it, they can use an unsupported but still available library.

@jonahnm
Copy link
Contributor

jonahnm commented Jun 12, 2023

Instead of doing this, I'd recommend just making SMLHelper incompatible.

It's not that simple sadly. It probably won't be received well to declare a library that "works" as incompatible, killing loads of mods yet again and backtracking on what we said. Will only lead to confusion and disappointment. As far as I'm aware I can only think of 1 more big incompatibility issue, which is the item tooltips.
I'm aware the code isn't pretty though.

What do you mean killing loads of mods? There is only one release of SMLHelper for 2.0, and it was considered an alpha release.

I mean that there are mods that depend on SMLHelper for 2.0.

SMLHelper is definitely no longer supported, but that doesn’t mean we need to have another massive breaking change when the compatibility issues are countable on one finger. People will use Nautilus because it is preferable. And if they don’t prefer it, they can use an unsupported but still available library.

Alright, fair enough.

Copy link
Contributor

@jonahnm jonahnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, this PR looks perfectly fine to me!

@LeeTwentyThree LeeTwentyThree merged commit 55f911d into SubnauticaModding:master Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Options panel is not patched when SMLHelper is installed
2 participants