Skip to content

Commit

Permalink
Update cleaners/drybuckets, Materials module now gone
Browse files Browse the repository at this point in the history
  • Loading branch information
quietust committed Jan 11, 2012
1 parent 24576ff commit 1f8a005
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions plugins/cleaners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include "df/unit.h"
#include "df/matter_state.h"
#include "df/cursor.h"

#include "modules/Materials.h"
#include "df/builtin_mats.h"

using std::vector;
using std::string;
Expand Down Expand Up @@ -48,12 +47,12 @@ command_result cleanmap (Core * c, bool snow, bool mud)

// filter snow
if(!snow
&& spatter->mat_type == DFHack::Materials::WATER
&& spatter->mat_type == df::builtin_mats::WATER
&& spatter->mat_state == df::matter_state::Powder)
continue;
// filter mud
if(!mud
&& spatter->mat_type == DFHack::Materials::MUD
&& spatter->mat_type == df::builtin_mats::MUD
&& spatter->mat_state == df::matter_state::Solid)
continue;

Expand Down
5 changes: 2 additions & 3 deletions plugins/drybuckets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
#include <DataDefs.h>
#include "df/world.h"
#include "df/item.h"

#include "modules/Materials.h"
#include "df/builtin_mats.h"

using std::string;
using std::vector;
Expand All @@ -28,7 +27,7 @@ DFhackCExport command_result df_drybuckets (Core * c, vector <string> & paramete
for (int i = 0; i < world->items.all.size(); i++)
{
df::item *item = world->items.all[i];
if ((item->getType() == df::item_type::LIQUID_MISC) && (item->getMaterial() == DFHack::Materials::WATER))
if ((item->getType() == df::item_type::LIQUID_MISC) && (item->getMaterial() == df::builtin_mats::WATER))
{
item->flags.bits.garbage_colect = 1;
dried_total++;
Expand Down

0 comments on commit 1f8a005

Please sign in to comment.