From: <gi...@cr...> - 2011-09-28 23:02:14
|
via af4cf4cc827c28374f296f2e303de96a50860042 (commit) via 6f4b0b0e17f4ba6d057761e1d73e7e818cc5bb68 (commit) from 6cfc8c393b1b9a7be4b641e3d8ac86afaeb4faa0 (commit) ----------------------------------------------------------------------- commit af4cf4cc827c28374f296f2e303de96a50860042 Author: Raphael Langella <rap...@gm...> Date: Thu Sep 29 00:27:13 2011 +0200 More save compat fixing. commit 6f4b0b0e17f4ba6d057761e1d73e7e818cc5bb68 Author: Raphael Langella <rap...@gm...> Date: Thu Sep 29 00:09:04 2011 +0200 Tiles: update the skill panel regarding the latest skill changes. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/tags.cc | 2 ++ crawl-ref/source/tilereg-skl.cc | 22 +++++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 9fc83ad..5a5d74b 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -2014,6 +2014,8 @@ static void tag_read_you(reader &th) you.train_set[j] = unmarshallBoolean(th); #if TAG_MAJOR_VERSION == 32 } + else if (you.skills[j]) + you.train_set[j] = true; #endif you.skill_points[j] = unmarshallInt(th); you.ct_skill_points[j] = unmarshallInt(th); diff --git a/crawl-ref/source/tilereg-skl.cc b/crawl-ref/source/tilereg-skl.cc index 332da77..74950b5 100644 --- a/crawl-ref/source/tilereg-skl.cc +++ b/crawl-ref/source/tilereg-skl.cc @@ -41,17 +41,10 @@ void SkillRegion::draw_tag() const int apt = species_apt(skill, you.species); std::string progress = ""; - // Don't display progress when unskilled or expert. - if (you.skills[skill] > 0 && you.skills[skill] < 27) - { - progress = make_stringf("(%d%%) ", - get_skill_percentage(skill)); - } - std::string desc = make_stringf("%-14s Skill %2d %s Aptitude %c%d", + std::string desc = make_stringf("%-14s Skill %4.1f Aptitude %c%d", skill_name(skill), - you.skills[skill], - progress.c_str(), + you.skill(skill, 10) / 10.0, apt > 0 ? '+' : ' ', apt); @@ -76,8 +69,8 @@ int SkillRegion::handle_mouse(MouseEvent &event) } #endif m_last_clicked_item = item_idx; - if (you.skills[skill] == 0) - mpr("You cannot toggle a skill you don't have yet."); + if (!you.can_train[skill]) + mpr("You cannot train this skill."); else if (you.skills[skill] >= 27) mpr("There's no point to toggling this skill anymore."); else @@ -101,8 +94,7 @@ bool SkillRegion::update_tab_tip_text(std::string &tip, bool active) { const char *prefix = active ? "" : "[L-Click] "; - tip = make_stringf("%s%s", - prefix, "Manage skills"); + tip = make_stringf("%s%s", prefix, "Manage skills"); return (true); } @@ -236,9 +228,9 @@ void SkillRegion::update() if (skill > SK_UNARMED_COMBAT && skill < SK_SPELLCASTING) continue; - InventoryTile desc; - desc.tile = tileidx_skill(skill, you.train[skill]); + desc.tile = tileidx_skill(skill, you.train[skill] + && you.can_train[skill]); desc.idx = idx; desc.quantity = you.skills[skill]; -- Dungeon Crawl Stone Soup |