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

Add ModConfig.Save #4212

Open
wants to merge 1 commit into
base: 1.4.4
Choose a base branch
from

Conversation

Destructor-Ben
Copy link
Contributor

What is the new feature?

Moves saving logic to a public method in ModConfig.
Moved from the bloated config ui rework pr - expect config.open to come soon.

Why should this be part of tModLoader?

Reflection is needed if configs are changed outside of the config menu, e,g, repositioning adrenaline and rage metres in calamity.

Are there alternative designs?

  • Having the method in ConfigManager
  • Not changing the nesting, even though it was horribly intended it may have been more intuitive

Sample usage for the new feature

ModContent.GetInstance<MyConfig>().Save();

ExampleMod updates

Could add an example, I didn't though.

@JavidPack JavidPack self-assigned this May 30, 2024
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.

None yet

2 participants