diff --git a/dfhack/include/modules/Creatures.h b/dfhack/include/modules/Creatures.h index 85910afdf..a0177ad50 100644 --- a/dfhack/include/modules/Creatures.h +++ b/dfhack/include/modules/Creatures.h @@ -265,7 +265,7 @@ namespace DFHack bool active; uint32_t jobId; uint8_t jobType; - uint32_t occupationPtr; + uint32_t occupationPtr; }; struct t_like { diff --git a/dfhack/modules/Items.cpp b/dfhack/modules/Items.cpp index 55c900feb..149b10312 100644 --- a/dfhack/modules/Items.cpp +++ b/dfhack/modules/Items.cpp @@ -222,7 +222,21 @@ std::string Items::getItemClass(int32_t index) it = this->descType.find(index); if(it==this->descType.end()) - return "unknown"; + { + /* these are dummy values for mood decoding */ + switch(index) + { + case 0: return "bar"; + case 1: return "cut gem"; + case 2: return "block"; + case 3: return "raw gem"; + case 4: return "raw stone"; + case 5: return "log"; + case 54: return "leather"; + case 57: return "cloth"; + default: return "unknown"; + } + } out = it->second->className; return out; } diff --git a/dfhack/modules/Materials.cpp b/dfhack/modules/Materials.cpp index 8c6102893..2c7997f82 100644 --- a/dfhack/modules/Materials.cpp +++ b/dfhack/modules/Materials.cpp @@ -402,10 +402,11 @@ std::string Materials::getDescription(t_material & mat) { if (mat.subIndex>=this->other.size()) { + if(mat.subIndex<0) + return "any"; if(mat.subIndex>=this->raceEx.size()) return "stuff"; - else - return this->raceEx[mat.subIndex].rawname; + return this->raceEx[mat.subIndex].rawname; } else {