summaryrefslogtreecommitdiff
path: root/plugins/cleanowned.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-05 15:05:57 +0200
committerPetr Mrázek2011-08-05 15:05:57 +0200
commit24bdc538e961e3d353e3e865f4f1bd7f04738483 (patch)
treed0d0334c0fc0b18a24bb38777c80375dd1dc316d /plugins/cleanowned.cpp
parent4d6ad9e0738443dedc25288876a25bf9f69919df (diff)
downloaddfhack-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.cpp24
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(