diff --git a/examples/creaturedump.cpp b/examples/creaturedump.cpp index f0128c00c..dc2707d27 100644 --- a/examples/creaturedump.cpp +++ b/examples/creaturedump.cpp @@ -258,7 +258,7 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) if(mymat[i].typeD>=0) { if(mymat[i].typeD<=mat.metalMat.size()) - sprintf(maintype, "%s bar", mat.metalMat[mymat[i].typeD].name); + sprintf(maintype, "%s bar", mat.metalMat[mymat[i].typeD].id); else strcpy(maintype, "invalid metal bar"); } @@ -464,7 +464,11 @@ int main (int numargs, char ** args) } mem = DF.getMemoryInfo(); - // get stone matgloss mapping + if(!Materials->ReadInorganicMaterials(mat.metalMat)) + { + cerr << "Can't get the inorganics types." << endl; + return 1; + } if(!Materials->ReadCreatureTypesEx(creaturestypes)) { cerr << "Can't get the creature types." << endl; diff --git a/tools/moodump.cpp b/tools/moodump.cpp index fa03be5ac..a79b8902c 100644 --- a/tools/moodump.cpp +++ b/tools/moodump.cpp @@ -74,7 +74,13 @@ int main (int numargs, char ** args) return 1; } mem = DF.getMemoryInfo(); - // get stone matgloss mapping + + if(!Materials->ReadInorganicMaterials(mat.metalMat)) + { + cerr << "Can't get the inorganics types." << endl; + return 1; + } + if(!Materials->ReadCreatureTypesEx(creaturestypes)) { cerr << "Can't get the creature types." << endl;