Skip to content

Commit 84122dc

Browse files
committed
so it turns out we doin 3.7.0 already
1 parent 8f88913 commit 84122dc

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

loader/include/Geode/loader/ModSettingsManager.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ namespace geode {
4747
*/
4848
void save(matjson::Value& json);
4949

50-
// todo in 3.7.0: add this
5150
/**
5251
* Get the savedata for settings, aka the JSON object that contains all
5352
* the settings' saved states that was loaded up from disk and will be
5453
* saved to disk
5554
* @warning Modifying this will modify the value of the settings - use
5655
* carefully!
5756
*/
58-
// matjson::Value& getSaveData();
57+
matjson::Value& getSaveData();
5958

6059
Result<> registerCustomSettingType(std::string_view type, SettingGenerator generator);
6160
// todo in v4: remove this

loader/src/loader/Mod.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ matjson::Value& Mod::getSaveContainer() {
4848
return m_impl->getSaveContainer();
4949
}
5050

51-
// todo in 3.7.0: move Mod::getSavedSettingsData() back here from
52-
// ModSettingsManager.cpp and make it use ModSettingsManager::getSaveData()
51+
matjson::Value& Mod::getSavedSettingsData() {
52+
return m_impl->m_settings->getSaveData();
53+
}
5354

5455
bool Mod::isEnabled() const {
5556
return m_impl->isEnabled();

loader/src/loader/ModSettingsManager.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ void ModSettingsManager::save(matjson::Value& json) {
235235
// Doing this since `ModSettingsManager` is expected to manage savedata fully
236236
json = m_impl->savedata;
237237
}
238-
// matjson::Value& ModSettingsManager::getSaveData() {
239-
// return m_impl->savedata;
240-
// }
238+
matjson::Value& ModSettingsManager::getSaveData() {
239+
return m_impl->savedata;
240+
}
241241

242242
std::shared_ptr<SettingV3> ModSettingsManager::get(std::string_view key) {
243243
auto id = std::string(key);
@@ -274,9 +274,3 @@ std::optional<Setting> ModSettingsManager::getLegacyDefinition(std::string_view
274274
bool ModSettingsManager::restartRequired() const {
275275
return m_impl->restartRequired;
276276
}
277-
278-
// todo in 3.7.0: move Mod::getSavedSettingsData() back to Mod.cpp and make it
279-
// use ModSettingsManager::getSaveData()
280-
matjson::Value& Mod::getSavedSettingsData() {
281-
return m_impl->m_settings->m_impl->savedata;
282-
}

0 commit comments

Comments
 (0)