mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
once again main is broken
This commit is contained in:
parent
78c69199e0
commit
c6bbf4b3a1
2 changed files with 12 additions and 1 deletions
|
@ -60,6 +60,7 @@ namespace geode {
|
|||
|
||||
protected:
|
||||
Result<> parseShared(JsonExpectedValue& json);
|
||||
Result<> isValidShared() const;
|
||||
|
||||
public:
|
||||
std::string getName() const;
|
||||
|
|
|
@ -47,6 +47,7 @@ Result<std::shared_ptr<SettingV3>> SettingV3::parseBuiltin(std::string const& mo
|
|||
GEODE_UNWRAP(ret->parse(modID, json));
|
||||
return root.ok(ret);
|
||||
}
|
||||
|
||||
std::optional<Setting> SettingV3::convertToLegacy() const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
@ -77,6 +78,11 @@ Result<> geode::detail::GeodeSettingBaseV3::parseShared(JsonExpectedValue& json)
|
|||
json.needs("enable-if").into(m_impl->enableIf);
|
||||
return Ok();
|
||||
}
|
||||
Result<> geode::detail::GeodeSettingBaseV3::isValidShared() const {
|
||||
// In the future if something like `enable-if` preventing
|
||||
// programmatic modification of settings it should be added here
|
||||
return Ok();
|
||||
}
|
||||
|
||||
class TitleSettingV3::Impl final {
|
||||
public:
|
||||
|
@ -152,7 +158,11 @@ bool BoolSettingV3::getValue() const {
|
|||
void BoolSettingV3::setValue(bool value) {
|
||||
m_impl->value = value;
|
||||
}
|
||||
Result<> BoolSettingV3::isValid(bool value) const {}
|
||||
Result<> BoolSettingV3::isValid(bool value) const {
|
||||
GEODE_UNWRAP(this->isValidShared());
|
||||
return Ok();
|
||||
}
|
||||
|
||||
bool BoolSettingV3::getDefaultValue() const {
|
||||
return m_impl->defaultValue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue