add missing inventory function

This commit is contained in:
MihailRis 2026-07-19 22:43:50 +03:00
parent 46b4aab6dc
commit 8e719eace6
4 changed files with 46 additions and 3 deletions

View file

@ -55,6 +55,16 @@ public:
return fields;
}
void setFields(dv::value&& table, bool clear) {
if (clear) {
fields = std::move(table);
return;
}
for (auto&& [key, value] : table.asObject()) {
fields[std::move(key)] = std::move(value);
}
}
bool hasFields() const {
return fields != nullptr;
}