summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-26 13:18:19 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-26 13:18:19 +0000
commitc96c36a0477909874c98bdbda3d13333ddb453e2 (patch)
tree0c2a18233a65c55086d640be41685824c12d782e /crawl-ref/source/command.cc
parenta2c2fe61d7f40cb8f5fecd84fdacfdf47d28f16a (diff)
downloadcrawl-ref-c96c36a0477909874c98bdbda3d13333ddb453e2.tar.gz
crawl-ref-c96c36a0477909874c98bdbda3d13333ddb453e2.zip
Implement FR 1894211: All transformations will now cause your equipment
to meld into your body than rather than being removed, so that when untransforming you don't have to put everything on again. * Wielded stuff cannot be melded, and does not yet use the autoswap function. * As before, the low-level transformation spells refuse to work with cursed equipment. * The messages are unnecessarily spammy if you change forms while already transformed (first everything is re-equipped, then unequipped again). Conversely, on simply untransforming the lack of messages might be confusing. * Might be buggy, feedback welcome! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7300 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index bfe6ace2f1..735a31adeb 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -554,17 +554,20 @@ void list_armour()
: "unknown")
<< " : ";
- if (armour_id != -1)
+ if (!you_can_wear(i,true))
+ estr << " (unavailable)";
+ else if (armour_id != -1 && !you_tran_can_wear(you.inv[armour_id])
+ || !you_tran_can_wear(i))
+ {
+ estr << " (currently unavailable)";
+ }
+ else if (armour_id != -1)
{
estr << you.inv[armour_id].name(DESC_INVENTORY);
colour = menu_colour(estr.str(),
menu_colour_item_prefix(you.inv[armour_id]),
"equip");
}
- else if (!you_can_wear(i,true))
- estr << " (unavailable)";
- else if (!you_tran_can_wear(i, true))
- estr << " (currently unavailable)";
else if (!you_can_wear(i))
estr << " (restricted)";
else
@@ -595,15 +598,18 @@ void list_jewellery(void)
: "unknown ")
<< " : ";
- if (jewellery_id != -1)
+ if (jewellery_id != -1 && !you_tran_can_wear(you.inv[jewellery_id])
+ || !you_tran_can_wear(i))
+ {
+ jstr << " (currently unavailable)";
+ }
+ else if (jewellery_id != -1)
{
jstr << you.inv[jewellery_id].name(DESC_INVENTORY);
std::string
prefix = menu_colour_item_prefix(you.inv[jewellery_id]);
colour = menu_colour(jstr.str(), prefix, "equip");
}
- else if (!you_tran_can_wear(i))
- jstr << " (currently unavailable)";
else
jstr << " none";