mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Add condition field to plugin cleaning data metadata
This commit is contained in:
@@ -106,7 +106,8 @@ loot::PluginCleaningData convert(const loot::rust::PluginCleaningData& data) {
|
||||
convert<loot::MessageContent>(data.detail()),
|
||||
data.itm_count(),
|
||||
data.deleted_reference_count(),
|
||||
data.deleted_navmesh_count());
|
||||
data.deleted_navmesh_count(),
|
||||
convert(data.condition()));
|
||||
}
|
||||
|
||||
loot::Location convert(const loot::rust::Location& location) {
|
||||
@@ -221,7 +222,8 @@ loot::rust::MessageType convert(loot::MessageType messageType) {
|
||||
convert<loot::rust::MessageContent>(data.GetDetail()),
|
||||
data.GetITMCount(),
|
||||
data.GetDeletedReferenceCount(),
|
||||
data.GetDeletedNavmeshCount());
|
||||
data.GetDeletedNavmeshCount(),
|
||||
data.GetCondition());
|
||||
} catch (const ::rust::Error& e) {
|
||||
std::rethrow_exception(mapError(e));
|
||||
}
|
||||
|
||||
@@ -34,13 +34,15 @@ PluginCleaningData::PluginCleaningData(
|
||||
const std::vector<MessageContent>& detail,
|
||||
unsigned int itm,
|
||||
unsigned int ref,
|
||||
unsigned int nav) :
|
||||
unsigned int nav,
|
||||
std::string_view condition) :
|
||||
crc_(crc),
|
||||
itm_(itm),
|
||||
ref_(ref),
|
||||
nav_(nav),
|
||||
utility_(utility),
|
||||
detail_(detail) {}
|
||||
detail_(detail),
|
||||
condition_(condition) {}
|
||||
|
||||
uint32_t PluginCleaningData::GetCRC() const { return crc_; }
|
||||
|
||||
@@ -58,12 +60,15 @@ std::vector<MessageContent> PluginCleaningData::GetDetail() const {
|
||||
return detail_;
|
||||
}
|
||||
|
||||
std::string PluginCleaningData::GetCondition() const { return condition_; }
|
||||
|
||||
bool operator==(const PluginCleaningData& lhs, const PluginCleaningData& rhs) {
|
||||
return lhs.GetCRC() == rhs.GetCRC() &&
|
||||
lhs.GetITMCount() == rhs.GetITMCount() &&
|
||||
lhs.GetDeletedReferenceCount() == rhs.GetDeletedReferenceCount() &&
|
||||
lhs.GetDeletedNavmeshCount() == rhs.GetDeletedNavmeshCount() &&
|
||||
lhs.GetCleaningUtility() == rhs.GetCleaningUtility() &&
|
||||
lhs.GetCondition() == rhs.GetCondition() &&
|
||||
lhs.GetDetail() == rhs.GetDetail();
|
||||
}
|
||||
|
||||
@@ -112,6 +117,14 @@ bool operator<(const PluginCleaningData& lhs, const PluginCleaningData& rhs) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lhs.GetCondition() < rhs.GetCondition()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (rhs.GetCondition() < lhs.GetCondition()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return lhs.GetDetail() < rhs.GetDetail();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user