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.
develop
Alexander Gavrilov 2011-04-14 20:06:36 +04:00
parent 1d805ca328
commit 5edde76b8f
1 changed files with 8 additions and 0 deletions

@ -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");