Add an enum for base material types.

develop
Petr Mrázek 2011-10-30 21:32:43 +01:00
parent 9849fcb118
commit 7f6fa2a008
2 changed files with 24 additions and 1 deletions

@ -668,6 +668,29 @@ namespace DFHack
~Materials(); ~Materials();
bool Finish(); bool Finish();
enum base_material
{
INORGANIC,
AMBER,
CORAL,
GLASS_GREEN,
GLASS_CLEAR,
GLASS_CRYSTAL,
WATER,
COAL,
POTASH,
ASH,
PEARLASH,
LYE,
MUD,
VOMIT,
SALT,
FILTH_B,
FILTH_Y,
UNKNOWN_SUBSTANCE,
GRIME
};
std::vector<df_inorganic_material*>* df_inorganic; std::vector<df_inorganic_material*>* df_inorganic;
std::vector<t_matglossInorganic> inorganic; std::vector<t_matglossInorganic> inorganic;
std::vector<df_plant_type*>* df_organic; std::vector<df_plant_type*>* df_organic;

@ -64,7 +64,7 @@ DFhackCExport command_result df_drybuckets (Core * c, vector <string> & paramete
for (std::size_t i = 0; i < numItems; i++) for (std::size_t i = 0; i < numItems; i++)
{ {
df_item *item = p_items[i]; df_item *item = p_items[i];
if ((item->getType() == 72) && (item->getMaterial() == 6)) if ((item->getType() == Items::LIQUID_MISC) && (item->getMaterial() == Materials::WATER))
{ {
item->flags.garbage_colect = 1; item->flags.garbage_colect = 1;
dried_total++; dried_total++;