From 7f6fa2a0089b772671f73b22eb07525a9e60a6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 30 Oct 2011 21:32:43 +0100 Subject: [PATCH] Add an enum for base material types. --- library/include/dfhack/modules/Materials.h | 23 ++++++++++++++++++++++ plugins/drybuckets.cpp | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/library/include/dfhack/modules/Materials.h b/library/include/dfhack/modules/Materials.h index 78531a2bc..9adf7613f 100644 --- a/library/include/dfhack/modules/Materials.h +++ b/library/include/dfhack/modules/Materials.h @@ -668,6 +668,29 @@ namespace DFHack ~Materials(); 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; std::vector inorganic; std::vector* df_organic; diff --git a/plugins/drybuckets.cpp b/plugins/drybuckets.cpp index 1041cb7a6..245661736 100644 --- a/plugins/drybuckets.cpp +++ b/plugins/drybuckets.cpp @@ -64,7 +64,7 @@ DFhackCExport command_result df_drybuckets (Core * c, vector & paramete for (std::size_t i = 0; i < numItems; 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; dried_total++;