diff --git a/dfhack/include/modules/Creatures.h b/dfhack/include/modules/Creatures.h index 77f341e56..910d7ff18 100644 --- a/dfhack/include/modules/Creatures.h +++ b/dfhack/include/modules/Creatures.h @@ -265,6 +265,7 @@ namespace DFHack int16_t typeA; int16_t typeB; int16_t typeC; + int32_t typeD; uint32_t flags; }; struct t_job diff --git a/dfhack/modules/Creatures.cpp b/dfhack/modules/Creatures.cpp index 5924680a9..68376f2dd 100644 --- a/dfhack/modules/Creatures.cpp +++ b/dfhack/modules/Creatures.cpp @@ -375,6 +375,7 @@ bool Creatures::ReadJob(const t_creature * furball, vector & mat) mat[i].typeA = p->readWord(cmats[i] + minfo->getOffset("job_material_maintype")); mat[i].typeB = p->readWord(cmats[i] + minfo->getOffset("job_material_sectype1")); mat[i].typeC = p->readWord(cmats[i] + minfo->getOffset("job_material_sectype2")); + mat[i].typeD = p->readDWord(cmats[i] + minfo->getOffset("job_material_sectype3")); mat[i].flags = p->readDWord(cmats[i] + minfo->getOffset("job_material_flags")); } return true; diff --git a/examples/creaturedump.cpp b/examples/creaturedump.cpp index 51fe9b40f..9a5dbf72e 100644 --- a/examples/creaturedump.cpp +++ b/examples/creaturedump.cpp @@ -262,7 +262,13 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) maintype = (char*)"block"; break; case 3: - maintype = (char*)"rough gem/glass"; + switch(mat[i].typeC) + { + case 3: maintype = (char*)"raw green glass"; break; + case 4: maintype = (char*)"raw clear glass"; break; + case 5: maintype = (char*)"raw crystal glass"; break; + default: maintype = (char*)"raw gems"; break; + } break; case 4: maintype = (char*)"raw stone"; @@ -270,6 +276,9 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) case 5: maintype = (char*)"wood log"; break; + case 24: + maintype = (char*)"weapon?"; + break; case 54: maintype = (char*)"leather"; break; @@ -280,7 +289,7 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) maintype = (char*)"unknown"; break; } - printf("\t%s(%d)\t%d %d - %.8x\n", maintype, mat[i].typeA, mat[i].typeB, mat[i].typeC, mat[i].flags); + printf("\t%s(%d)\t%d %d %d - %.8x\n", maintype, mat[i].typeA, mat[i].typeB, mat[i].typeC, mat[i].typeD, mat[i].flags); } } } diff --git a/output/Memory.xml b/output/Memory.xml index e2079a315..f6698bd11 100755 --- a/output/Memory.xml +++ b/output/Memory.xml @@ -1429,6 +1429,7 @@ map_data_1b60_offset 0x1B9c 0x0 like mood materials, 0=bars, 4=stone, 5=wood, 57=cloth, 54=leather ... 0x2 always -1 0x4 subtype ? + 0x8 subtype ? 0x18 set only for shell / bone mood requirements ? Materials