diff options
| author | Quietust | 2012-01-16 20:16:16 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-16 20:16:16 -0600 |
| commit | 64b55acf37519450f6feca5cda7d8fba2ee1e491 (patch) | |
| tree | a135914d93b3472668e63f5ceac9c73bffc46076 /plugins/cleanowned.cpp | |
| parent | 97bae19c13eb7f1b9ce651a0eae0a29a0e0b492b (diff) | |
| download | dfhack-64b55acf37519450f6feca5cda7d8fba2ee1e491.tar.gz dfhack-64b55acf37519450f6feca5cda7d8fba2ee1e491.tar.bz2 dfhack-64b55acf37519450f6feca5cda7d8fba2ee1e491.tar.xz | |
df_item -> df::item, t_itemflags -> df::item_flags
Diffstat (limited to 'plugins/cleanowned.cpp')
| -rw-r--r-- | plugins/cleanowned.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/cleanowned.cpp b/plugins/cleanowned.cpp index 966d8e33..0935c2ea 100644 --- a/plugins/cleanowned.cpp +++ b/plugins/cleanowned.cpp @@ -99,7 +99,7 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete ok &= Creatures->Start(num_creatures); ok &= Tran->Start(); - vector<df_item *> p_items; + vector<df::item *> p_items; ok &= Items->readItemVector(p_items); if(!ok) { @@ -111,11 +111,11 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete for (std::size_t i=0; i < p_items.size(); i++) { - df_item * item = p_items[i]; + df::item * item = p_items[i]; bool confiscate = false; bool dump = false; - if (!item->flags.owned) + if (!item->flags.bits.owned) { int32_t owner = Items->getItemOwnerID(item); if (owner >= 0) @@ -131,21 +131,21 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete std::string name = Items->getItemClass(item); - if (item->flags.rotten) + if (item->flags.bits.rotten) { c->con.print("Confiscating a rotten item: \t"); confiscate = true; } - else if (item->flags.on_ground) + else if (item->flags.bits.on_ground) { int32_t type = item->getType(); - if(type == Items::MEAT || - type == Items::FISH || - type == Items::VERMIN || - type == Items::PET || - type == Items::PLANT || - type == Items::CHEESE || - type == Items::FOOD + if(type == df::item_type::MEAT || + type == df::item_type::FISH || + type == df::item_type::VERMIN || + type == df::item_type::PET || + type == df::item_type::PLANT || + type == df::item_type::CHEESE || + type == df::item_type::FOOD ) { confiscate = true; @@ -209,7 +209,7 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete if (!Items->removeItemOwner(item, Creatures)) c->con.print("(unsuccessfully) "); if (dump) - item->flags.dump = 1; + item->flags.bits.dump = 1; } c->con.print("\n"); } |
