diff options
| author | Petr Mrázek | 2011-08-05 15:05:57 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-08-05 15:05:57 +0200 |
| commit | 24bdc538e961e3d353e3e865f4f1bd7f04738483 (patch) | |
| tree | d0d0334c0fc0b18a24bb38777c80375dd1dc316d /plugins/cleanowned.cpp | |
| parent | 4d6ad9e0738443dedc25288876a25bf9f69919df (diff) | |
| download | dfhack-24bdc538e961e3d353e3e865f4f1bd7f04738483.tar.gz dfhack-24bdc538e961e3d353e3e865f4f1bd7f04738483.tar.bz2 dfhack-24bdc538e961e3d353e3e865f4f1bd7f04738483.tar.xz | |
Fix cleanowned output.
Diffstat (limited to 'plugins/cleanowned.cpp')
| -rw-r--r-- | plugins/cleanowned.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/cleanowned.cpp b/plugins/cleanowned.cpp index e460a262..a4e36791 100644 --- a/plugins/cleanowned.cpp +++ b/plugins/cleanowned.cpp @@ -165,19 +165,9 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete if (confiscate) { - if (!dry_run) - { - if (!Items->removeItemOwner(itm, Creatures)) - c->con.print("(unsuccessfully) "); - if (dump) - itm.base->flags.dump = 1; - - // NO-OP really - //Items->writeItem(itm); - } - c->con.print( - "%s (wear %d)", + "0x%x %s (wear %d)", + itm.base, Items->getItemDescription(itm, Materials).c_str(), itm.wear_level ); @@ -199,6 +189,16 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete c->con.print(", owner %s", info.c_str()); } + if (!dry_run) + { + if (!Items->removeItemOwner(itm, Creatures)) + c->con.print("(unsuccessfully) "); + if (dump) + itm.base->flags.dump = 1; + + // NO-OP really + //Items->writeItem(itm); + } c->con.print("\n"); /* printf( |
