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:
|
protected:
|
||||||
Result<> parseShared(JsonExpectedValue& json);
|
Result<> parseShared(JsonExpectedValue& json);
|
||||||
|
Result<> isValidShared() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::string getName() const;
|
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));
|
GEODE_UNWRAP(ret->parse(modID, json));
|
||||||
return root.ok(ret);
|
return root.ok(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Setting> SettingV3::convertToLegacy() const {
|
std::optional<Setting> SettingV3::convertToLegacy() const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
@ -77,6 +78,11 @@ Result<> geode::detail::GeodeSettingBaseV3::parseShared(JsonExpectedValue& json)
|
||||||
json.needs("enable-if").into(m_impl->enableIf);
|
json.needs("enable-if").into(m_impl->enableIf);
|
||||||
return Ok();
|
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 {
|
class TitleSettingV3::Impl final {
|
||||||
public:
|
public:
|
||||||
|
@ -152,7 +158,11 @@ bool BoolSettingV3::getValue() const {
|
||||||
void BoolSettingV3::setValue(bool value) {
|
void BoolSettingV3::setValue(bool value) {
|
||||||
m_impl->value = 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 {
|
bool BoolSettingV3::getDefaultValue() const {
|
||||||
return m_impl->defaultValue;
|
return m_impl->defaultValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue