Some support for decoding mood added

Fucked indentation a little bit with visual studio
develop
simon 2010-05-06 16:47:36 +02:00
parent 88f98030d3
commit 52b7ab6f46
3 changed files with 19 additions and 4 deletions

@ -265,7 +265,7 @@ namespace DFHack
bool active;
uint32_t jobId;
uint8_t jobType;
uint32_t occupationPtr;
uint32_t occupationPtr;
};
struct t_like
{

@ -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;
}

@ -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
{