allow MaterialInfo structs to be sorted

develop
Myk Taylor 2023-03-02 17:49:28 -08:00
parent 3b116c8061
commit d3ef96cc05
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

@ -169,6 +169,9 @@ namespace DFHack
inline bool operator!= (const MaterialInfo &a, const MaterialInfo &b) { inline bool operator!= (const MaterialInfo &a, const MaterialInfo &b) {
return a.type != b.type || a.index != b.index; return a.type != b.type || a.index != b.index;
} }
inline bool operator< (const MaterialInfo &a, const MaterialInfo &b) {
return a.type < b.type || (a.type == b.type && a.index < b.index);
}
DFHACK_EXPORT bool isSoilInorganic(int material); DFHACK_EXPORT bool isSoilInorganic(int material);
DFHACK_EXPORT bool isStoneInorganic(int material); DFHACK_EXPORT bool isStoneInorganic(int material);