Fix order-of-operations oopsie in DFHack::Items::moveToInventory

develop
Kelly Martin 2012-05-19 14:13:32 -05:00
parent bc7dbe1175
commit abbe0ceb8d
1 changed files with 5 additions and 5 deletions

@ -755,11 +755,11 @@ bool DFHack::Items::moveToInventory(MapExtras::MapCache &mc, df::item *item, df:
if (verbose) { Core::printerr("Item %d is not clothing or armor; it cannot be equipped. Please choose a different item (or use the Ignore option if you really want to equip an inappropriate item).\n", item->id); } if (verbose) { Core::printerr("Item %d is not clothing or armor; it cannot be equipped. Please choose a different item (or use the Ignore option if you really want to equip an inappropriate item).\n", item->id); }
return false; return false;
} }
else if (!item->getType() == df::enums::item_type::GLOVES && else if (item->getType() != df::enums::item_type::GLOVES &&
!item->getType() == df::enums::item_type::HELM && item->getType() != df::enums::item_type::HELM &&
!item->getType() == df::enums::item_type::ARMOR && item->getType() != df::enums::item_type::ARMOR &&
!item->getType() == df::enums::item_type::PANTS && item->getType() != df::enums::item_type::PANTS &&
!item->getType() == df::enums::item_type::SHOES && item->getType() != df::enums::item_type::SHOES &&
!targetBodyPart) !targetBodyPart)
{ {
if (verbose) { Core::printerr("Item %d is of an unrecognized type; it cannot be equipped (because the module wouldn't know where to put it).\n", item->id); } if (verbose) { Core::printerr("Item %d is of an unrecognized type; it cannot be equipped (because the module wouldn't know where to put it).\n", item->id); }