From 5edde76b8f43dbb3cc619b837da04b3a08c6c74f Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Thu, 14 Apr 2011 20:06:36 +0400 Subject: [PATCH] Remove owned status from all food lying on the ground. It is kinda late to dump an item that already produces miasma, so take some preventive measures. Food that is being eaten or carried should not be on the ground. --- tools/playground/cleanowned.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/playground/cleanowned.cpp b/tools/playground/cleanowned.cpp index f68d4eb9a..d26ae5c99 100644 --- a/tools/playground/cleanowned.cpp +++ b/tools/playground/cleanowned.cpp @@ -94,6 +94,8 @@ int main (int argc, char *argv[]) if (!itm.base.flags.owned) continue; + std::string name = Items->getItemClass(itm.matdesc.itemType); + bool confiscate = false; bool dump = false; @@ -102,6 +104,12 @@ int main (int argc, char *argv[]) printf("Confiscating a rotten item: \t"); confiscate = true; } + else if (itm.base.flags.on_ground && + (name == "food" || name == "meat" || name == "plant")) + { + printf("Confiscating a dropped foodstuff: \t"); + confiscate = true; + } else if (itm.wear_level >= wear_dump_level) { printf("Confiscating and dumping a worn item: \t");