Skip to content

Update config to use MelonPreferences - #7

Open
Vaquh wants to merge 4 commits into
Azn9:masterfrom
Vaquh:preference-refactor
Open

Update config to use MelonPreferences#7
Vaquh wants to merge 4 commits into
Azn9:masterfrom
Vaquh:preference-refactor

Conversation

@Vaquh

@Vaquh Vaquh commented Mar 30, 2025

Copy link
Copy Markdown

This update was focused on changing the config system to used the preferred MelonPreferences, and moved the only config entry into MelonPreferences.cfg.

The reason for this change was that I was under the mistaken assumption that a few other mods were recently updated to only support MelonLoader 0.7.0 which breaks the config system this mod used.

I have tested this version with MelonLoader 0.6.1 which is the officially supported version and there should be no issues.

Vaquh added 3 commits March 30, 2025 10:36
Changes configuration from tomlet to the preferred MelonPreferences
Configuration is now found in the MelonPreferences.cfg
Changed ReferencePath to the preferred MD_Directory env variable
@lxymahatma

Copy link
Copy Markdown
Collaborator

imo it's still better to keep the AccuracyIndicator.cfg cz i think it's easier for people who want to change this manually
iirc you can pass the config file name when creating the category

@Vaquh

Vaquh commented Mar 31, 2025

Copy link
Copy Markdown
Author

That's easy enough.

However, keeping AccuracyIndicator.cfg presents an issue with an already existing .cfg file as MelonPreferences will only append the new category to the file. This shows two of the same entries and might be confusing. I don't think it's a huge problem as someone can simply delete the file to generate a clean one and there is only one boolean to worry about, but would like your opinion on it.

image

@Azn9

Azn9 commented Mar 31, 2025

Copy link
Copy Markdown
Owner

Maybe add a note in the comment?
Else, LGTM even if I no longer really contribute to this project 😅

@lxymahatma

Copy link
Copy Markdown
Collaborator

That's easy enough.

However, keeping AccuracyIndicator.cfg presents an issue with an already existing .cfg file as MelonPreferences will only append the new category to the file. This shows two of the same entries and might be confusing. I don't think it's a huge problem as someone can simply delete the file to generate a clean one and there is only one boolean to worry about, but would like your opinion on it.

image

it's not a big deal since normally no one will change this

My original plan is to have this mod to give an attribute PnlToggle which u can put on a boolean value to generate a toggle and control the values in game automatically but since I'm working on the mod manager project i don't have enough time to maintain it, it actually did what I want in md 4.0.0 or some version but now they changed it a little bit so need to do some change to mdmirror project to make the mod work again

@Vaquh

Vaquh commented Apr 2, 2025

Copy link
Copy Markdown
Author

Maybe add a note in the comment? Else, LGTM even if I no longer really contribute to this project 😅

Do you mean adding a note to the config? If so, I'm hesitant to add extra clutter.
I think a mention about the config change in the description of the next release should be enough.

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.

3 participants