diff --git a/dfhack/include/DFTypes.h b/dfhack/include/DFTypes.h index fea2247b2..458adb741 100644 --- a/dfhack/include/DFTypes.h +++ b/dfhack/include/DFTypes.h @@ -199,6 +199,17 @@ struct t_settlement int16_t local_y1; int16_t local_y2; }; + +struct t_attrib +{ + uint32_t level; + uint32_t field_4; + uint32_t field_8; + uint32_t field_C; + uint32_t leveldiff; + uint32_t field_14; + uint32_t field_18; +}; }// namespace DFHack #endif // TYPES_H_INCLUDED diff --git a/dfhack/include/modules/Creatures.h b/dfhack/include/modules/Creatures.h index a0177ad50..92d7809aa 100644 --- a/dfhack/include/modules/Creatures.h +++ b/dfhack/include/modules/Creatures.h @@ -275,16 +275,6 @@ namespace DFHack t_matglossPair material; bool active; }; - struct t_attrib - { - uint32_t level; - uint32_t field_4; - uint32_t field_8; - uint32_t field_C; - uint32_t leveldiff; - uint32_t field_14; - uint32_t field_18; - }; // FIXME: define in Memory.xml instead? diff --git a/dfhack/include/modules/Materials.h b/dfhack/include/modules/Materials.h index f216893b2..803443313 100644 --- a/dfhack/include/modules/Materials.h +++ b/dfhack/include/modules/Materials.h @@ -60,6 +60,24 @@ namespace DFHack char adjective[128]; std::vector ColorModifier; std::vector bodypart; + + t_attrib strength; + t_attrib agility; + t_attrib toughness; + t_attrib endurance; + t_attrib recuperation; + t_attrib disease_resistance; + t_attrib analytical_ability; + t_attrib focus; + t_attrib willpower; + t_attrib creativity; + t_attrib intuition; + t_attrib patience; + t_attrib memory; + t_attrib linguistic_ability; + t_attrib spatial_sense; + t_attrib musicality; + t_attrib kinesthetic_sense; }; struct t_matglossOther diff --git a/dfhack/modules/Items.cpp b/dfhack/modules/Items.cpp index ec2ef540e..c01de5b0b 100644 --- a/dfhack/modules/Items.cpp +++ b/dfhack/modules/Items.cpp @@ -24,11 +24,12 @@ distribution. #include "DFCommonInternal.h" #include "../private/APIPrivate.h" -#include "modules/Materials.h" -#include "modules/Items.h" +#include "DFTypes.h" #include "DFMemInfo.h" #include "DFProcess.h" #include "DFVector.h" +#include "modules/Materials.h" +#include "modules/Items.h" using namespace DFHack; @@ -263,4 +264,4 @@ std::string Items::getItemDescription(uint32_t itemptr, Materials * Materials) out.append(" "); out.append(this->getItemClass(item.matdesc.itemType)); return out; -} \ No newline at end of file +} diff --git a/dfhack/modules/Materials.cpp b/dfhack/modules/Materials.cpp index 2c7997f82..b03e5ac57 100644 --- a/dfhack/modules/Materials.cpp +++ b/dfhack/modules/Materials.cpp @@ -24,6 +24,7 @@ distribution. #include "DFCommonInternal.h" #include "../private/APIPrivate.h" +#include "DFTypes.h" #include "modules/Materials.h" #include "DFMemInfo.h" #include "DFProcess.h" diff --git a/dfhack/modules/Materials_C.cpp b/dfhack/modules/Materials_C.cpp index db8754390..ebe1f1f15 100644 --- a/dfhack/modules/Materials_C.cpp +++ b/dfhack/modules/Materials_C.cpp @@ -30,6 +30,7 @@ distribution. using namespace std; #include "DFCommonInternal.h" +#include "DFTypes.h" #include "modules/Materials.h" #include "modules/Materials_C.h" diff --git a/dfhack/python/DF_Material.cpp b/dfhack/python/DF_Material.cpp index 56e09b304..97af851e2 100644 --- a/dfhack/python/DF_Material.cpp +++ b/dfhack/python/DF_Material.cpp @@ -32,6 +32,7 @@ distribution. using namespace std; +#include "DFTypes.h" #include "modules/Materials.h" #include "DF_Imports.cpp" #include "DF_Helpers.cpp"