so it turns out we doin 3.7.0 already

This commit is contained in:
HJfod 2024-09-15 22:12:47 +03:00
parent 8f88913815
commit 84122dc08d
3 changed files with 7 additions and 13 deletions

View file

@ -47,7 +47,6 @@ namespace geode {
*/
void save(matjson::Value& json);
// todo in 3.7.0: add this
/**
* Get the savedata for settings, aka the JSON object that contains all
* the settings' saved states that was loaded up from disk and will be
@ -55,7 +54,7 @@ namespace geode {
* @warning Modifying this will modify the value of the settings - use
* carefully!
*/
// matjson::Value& getSaveData();
matjson::Value& getSaveData();
Result<> registerCustomSettingType(std::string_view type, SettingGenerator generator);
// todo in v4: remove this

View file

@ -48,8 +48,9 @@ matjson::Value& Mod::getSaveContainer() {
return m_impl->getSaveContainer();
}
// todo in 3.7.0: move Mod::getSavedSettingsData() back here from
// ModSettingsManager.cpp and make it use ModSettingsManager::getSaveData()
matjson::Value& Mod::getSavedSettingsData() {
return m_impl->m_settings->getSaveData();
}
bool Mod::isEnabled() const {
return m_impl->isEnabled();

View file

@ -235,9 +235,9 @@ void ModSettingsManager::save(matjson::Value& json) {
// Doing this since `ModSettingsManager` is expected to manage savedata fully
json = m_impl->savedata;
}
// matjson::Value& ModSettingsManager::getSaveData() {
// return m_impl->savedata;
// }
matjson::Value& ModSettingsManager::getSaveData() {
return m_impl->savedata;
}
std::shared_ptr<SettingV3> ModSettingsManager::get(std::string_view key) {
auto id = std::string(key);
@ -274,9 +274,3 @@ std::optional<Setting> ModSettingsManager::getLegacyDefinition(std::string_view
bool ModSettingsManager::restartRequired() const {
return m_impl->restartRequired;
}
// todo in 3.7.0: move Mod::getSavedSettingsData() back to Mod.cpp and make it
// use ModSettingsManager::getSaveData()
matjson::Value& Mod::getSavedSettingsData() {
return m_impl->m_settings->m_impl->savedata;
}