actually enforce NOCOMMIT tags finally

This commit is contained in:
Martin Michelsen
2025-12-02 21:46:58 -08:00
parent 779ec9df3b
commit 194bb5b393
5 changed files with 41 additions and 13 deletions
+8
View File
@@ -62,6 +62,10 @@ void QuestMetadata::apply_json_overrides(const phosg::JSON& json) {
this->default_drop_mode = phosg::enum_for_name<ServerDropMode>(json.at("DefaultDropMode").as_string());
} catch (const out_of_range&) {
}
try {
this->enable_schtserv_commands = json.at("EnableSchtservCommands").as_bool();
} catch (const out_of_range&) {
}
}
void QuestMetadata::assign_default_floors() {
@@ -219,6 +223,10 @@ void QuestMetadata::assert_compatible(const QuestMetadata& other) const {
throw runtime_error(format("quest version has different default drop mode (existing: {}, new: {})",
phosg::name_for_enum(this->default_drop_mode), phosg::name_for_enum(other.default_drop_mode)));
}
if (this->enable_schtserv_commands != other.enable_schtserv_commands) {
throw runtime_error(format("quest version has different value for enable_schtserv_commands (existing: {}, new: {})",
this->enable_schtserv_commands ? "true" : "false", other.enable_schtserv_commands ? "true" : "false"));
}
}
phosg::JSON QuestMetadata::json() const {