diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-30 14:40:48 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-30 14:40:48 +0000 |
commit | 2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5 (patch) | |
tree | 4aa478ab9403ef8fd670ee1ed04d8cf00f88be0b /crawl-ref/source/output.cc | |
parent | 26daf2e137f335a48ae532b3a379cef0550d4e39 (diff) | |
download | crawl-ref-2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5.tar.gz crawl-ref-2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5.zip |
Several bugfixes.
In no particular order:
+ Beogh shouldn't care about you attacking non-orc friends.
+ Mummies don't get "Food" listed as ability costs.
+ corrected order of invis flickering
+ modified (and tidied) you_can_wear checks and output
+ added ']' command to list currently worn equipment (inv)
+ wielded cursed items can no longer be fired
+ Wanderers no longer get inappropriate armour
+ Fixed "bad item" message for confirm-inscribed items
+ copied "Discharge" to "Static Discharge" in spells.txt
(Maybe we should remove the first, but I was unsure about
that, so I left it for now.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2035 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r-- | crawl-ref/source/output.cc | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 011f2b3a18..0b8689898a 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -23,10 +23,12 @@ #include "externs.h" #include "abl-show.h" +#include "describe.h" #include "format.h" #include "fight.h" #include "initfile.h" #include "itemname.h" +#include "items.h" #include "menu.h" #include "ouch.h" #include "player.h" @@ -637,8 +639,13 @@ static const char *s_equip_slot_names[] = const char *equip_slot_to_name(int equip) { - if (equip == EQ_RINGS) + if (equip == EQ_RINGS || equip == EQ_LEFT_RING || equip == EQ_RIGHT_RING) return "Ring"; + + if (equip == EQ_BOOTS && + (you.species == SP_CENTAUR || you.species == SP_NAGA)) + return "Barding"; + if (equip < 0 || equip >= NUM_EQUIP) return ""; return s_equip_slot_names[equip]; @@ -844,11 +851,6 @@ std::vector<formatted_string> get_full_detail(bool calc_unid, long sc) { int eqslot = e_order[i]; const char *slot = equip_slot_to_name( eqslot ); - if (eqslot == EQ_LEFT_RING || eqslot == EQ_RIGHT_RING) - slot = "Ring"; - else if (eqslot == EQ_BOOTS && - (you.species == SP_CENTAUR || you.species == SP_NAGA)) - slot = "Barding"; if ( you.equip[ e_order[i] ] != -1) { @@ -1245,11 +1247,6 @@ void print_overview_screen() { int eqslot = e_order[i]; const char *slot = equip_slot_to_name( eqslot ); - if (eqslot == EQ_LEFT_RING || eqslot == EQ_RIGHT_RING) - slot = "Ring"; - else if (eqslot == EQ_BOOTS && - (you.species == SP_CENTAUR || you.species == SP_NAGA)) - slot = "Barding"; if ( you.equip[ e_order[i] ] != -1) { @@ -1276,27 +1273,10 @@ void print_overview_screen() else snprintf(buf, sizeof buf, "%-7s:", slot); } - else if (!you_can_wear(e_order[i])) + else if (!you_can_wear(e_order[i], true)) { - if (e_order[i] == EQ_BODY_ARMOUR || e_order[i] == EQ_HELMET) - { - if (!you_tran_can_wear(e_order[i])) - { - snprintf(buf, sizeof buf, "%-7s: " - "<darkgray>(currently unavailable)</darkgray>", - slot); - } - else - { snprintf(buf, sizeof buf, - "%-7s: <lightgray>(ill-fitting)</lightgray>", - slot); - } - } - else - { - snprintf(buf, sizeof buf, - "%-7s: <darkgray>(unavailable)</darkgray>", slot); - } + snprintf(buf, sizeof buf, + "%-7s: <darkgray>(unavailable)</darkgray>", slot); } else if (!you_tran_can_wear(e_order[i])) { @@ -1304,6 +1284,12 @@ void print_overview_screen() "<darkgray>(currently unavailable)</darkgray>", slot); } + else if (!you_can_wear(e_order[i])) + { + snprintf(buf, sizeof buf, + "%-7s: <lightgray>(ill-fitting)</lightgray>", + slot); + } else { snprintf(buf, sizeof buf, "%-7s:", slot); |