diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-12 22:33:11 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-12 22:33:11 +0000 |
commit | daffe68811f8666a4aaf25fa882fd0bfe196015f (patch) | |
tree | c62456ce86b9e10b3be5d02153441c4fd5584c19 /crawl-ref/source/item_use.cc | |
parent | 3dbe5462b4b3113a209e0c00bc38dc324ef5b313 (diff) | |
download | crawl-ref-daffe68811f8666a4aaf25fa882fd0bfe196015f.tar.gz crawl-ref-daffe68811f8666a4aaf25fa882fd0bfe196015f.zip |
Add minor cleanups of the new helmet handling code: use is_hard_helmet()
instead of hardcoding references to caps and wizard hats when possible.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3049 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index c9d4af14c7..5c20371fe0 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -848,9 +848,9 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) // it fits return (true); } - else if (sub_type == ARM_CAP || sub_type == ARM_WIZARD_HAT) + else if (slot == EQ_HELMET && !is_hard_helmet( item )) { - // caps & wiz hats always fit + // soft helmets (caps and wizard hats) always fit return (true); } else if (!can_equip( slot, ignore_temporary )) |