From dc629bc2519b216673b1ab2e378fd8d0055643cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 3 Nov 2011 02:40:37 +0100 Subject: [PATCH] Fix cleanowned plugin. --- plugins/cleanowned.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/cleanowned.cpp b/plugins/cleanowned.cpp index dd79d4493..cc4bee1e3 100644 --- a/plugins/cleanowned.cpp +++ b/plugins/cleanowned.cpp @@ -148,8 +148,22 @@ DFhackCExport command_result df_cleanowned (Core * c, vector & paramete type == Items::FOOD ) { - c->con.print("Confiscating a dropped foodstuff/pet vermin: \t"); confiscate = true; + if(dump_scattered) + { + c->con.print("Dumping a dropped item: \t"); + dump = true; + } + else + { + c->con.print("Confiscating a dropped item: \t"); + } + } + else if(dump_scattered) + { + c->con.print("Confiscating and dumping litter: \t"); + confiscate = true; + dump = true; } } else if (item->getWear() >= wear_dump_level) @@ -158,12 +172,6 @@ DFhackCExport command_result df_cleanowned (Core * c, vector & paramete confiscate = true; dump = true; } - else if (dump_scattered && item->flags.on_ground) - { - c->con.print("Confiscating and dumping litter: \t"); - confiscate = true; - dump = true; - } else if (confiscate_all) { c->con.print("Confiscating: \t");