-
Notifications
You must be signed in to change notification settings - Fork 126
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
refactor: Mod information file export #832
base: main
Are you sure you want to change the base?
refactor: Mod information file export #832
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine, playerd an entire match with no issues
@@ -628,6 +619,28 @@ void ModManager::SearchFilesystemForMods() | |||
std::sort(m_LoadedMods.begin(), m_LoadedMods.end(), [](Mod& a, Mod& b) { return a.LoadPriority < b.LoadPriority; }); | |||
} | |||
|
|||
void ModManager::ExportModsConfigurationToFile() | |||
{ | |||
m_EnabledModsCfg.SetObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does m_EnabledModsCfg.SetObject();
have to be set again here?
(I don't think I fully understand what that line does... ^^)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It resets the state of the m_EnabledModsCfg
object (same as dict = {}
in js for instance)
(on Holiday for a few days, maybe someone else could take care of code review to get this merged?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code also looks good, manually verified there were no extra changes 👍
Two refactor changes here (one per commit):
enabledmods.json
path (moved to header file);enabledmods.json
creation logic into newExportModsConfigurationToFile
method (with associated documentation).