added getType

develop
doomchild 2010-08-27 09:19:23 -05:00
parent cfa39dde7f
commit fb7cfc45c8
2 changed files with 13 additions and 0 deletions

@ -44,6 +44,7 @@ DFHACK_EXPORT int Materials_ReadOthers(DFHackObject* mat);
DFHACK_EXPORT void Materials_ReadAllMaterials(DFHackObject* mat);
DFHACK_EXPORT const char* Materials_getType(DFHackObject* mat, t_material* material);
DFHACK_EXPORT const char* Materials_getDescription(DFHackObject* mat, t_material* material);
DFHACK_EXPORT int Materials_getInorganicSize(DFHackObject* mat);

@ -116,6 +116,18 @@ void Materials_ReadAllMaterials(DFHackObject* mat)
}
}
const char* Materials_getType(DFHackObject* mat, t_material* material)
{
if(mat != NULL)
{
std::string type = ((DFHack::Materials*)mat)->getType(*material);
return type.c_str();
}
return "\0";
}
const char* Materials_getDescription(DFHackObject* mat, t_material* material)
{
if(mat != NULL)