From 4ec449ed4162e88fb5b3231793fc055912ee3c56 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Fri, 23 Aug 2024 22:56:00 +0300 Subject: [PATCH] deprecate old settings functions --- loader/include/Geode/loader/Mod.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loader/include/Geode/loader/Mod.hpp b/loader/include/Geode/loader/Mod.hpp index a5f19187..0cd436e7 100644 --- a/loader/include/Geode/loader/Mod.hpp +++ b/loader/include/Geode/loader/Mod.hpp @@ -176,7 +176,9 @@ namespace geode { bool hasSettings() const; std::vector getSettingKeys() const; bool hasSetting(std::string_view const key) const; + [[deprecated("Use Mod::getSettingV3")]] std::optional getSettingDefinition(std::string_view const key) const; + [[deprecated("Use Mod::getSettingV3")]] SettingValue* getSetting(std::string_view const key) const; std::shared_ptr getSettingV3(std::string_view const key) const; @@ -190,6 +192,7 @@ namespace geode { * @param value The SettingValue class that shall handle this setting * @see addCustomSetting */ + [[deprecated("Use Mod::registerCustomSettingType")]] void registerCustomSetting(std::string_view const key, std::unique_ptr value); /** * Register a custom setting's value class. The new SettingValue class @@ -204,6 +207,7 @@ namespace geode { * } */ template + [[deprecated("Use Mod::registerCustomSettingType")]] void addCustomSetting(std::string_view const key, V const& value) { this->registerCustomSetting(key, std::make_unique(std::string(key), this->getID(), value)); }