diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-16 02:00:13 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-16 02:00:13 +0000 |
commit | b7fba6b11f0b5727ed4dd54324b94f2443ea81e0 (patch) | |
tree | 2db275fb964219a84c8701781932e2c71cee43ce /crawl-ref | |
parent | c5f460f024c071a1c56980dc89ab15b2cf860f8c (diff) | |
download | crawl-ref-b7fba6b11f0b5727ed4dd54324b94f2443ea81e0.tar.gz crawl-ref-b7fba6b11f0b5727ed4dd54324b94f2443ea81e0.zip |
Add game option evil_colour, set from the options file variable $evil, and use
it to colour monster pane entries for when it would be unchivarlic for a
TSO-ite to attack them.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8468 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/externs.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 3ded203790..6a65a845a9 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -2061,6 +2061,8 @@ public: bool classic_item_colours; // Use old-style item colours bool item_colour; // Colour items on level map + unsigned evil_colour; // Colour for things player's god dissapproves + unsigned detected_monster_colour; // Colour of detected monsters unsigned detected_item_colour; // Colour of detected items unsigned status_caption_colour; // Colour of captions in HUD. diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index e689f6c8df..648f246052 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -1505,6 +1505,8 @@ void game_options::read_options(InitLineInput &il, bool runscript, #endif Options.explore_stop |= Options.explore_stop_prompt; + + evil_colour = str_to_colour(variables["evil"]); } void game_options::fixup_options() @@ -1518,6 +1520,9 @@ void game_options::fixup_options() if (!check_dir("Morgue directory", morgue_dir)) end(1); + + if (evil_colour == BLACK) + evil_colour = MAGENTA; } static int _str_to_killcategory(const std::string &s) diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 88732c6bd6..1e4f3e05f6 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1400,7 +1400,7 @@ void monster_pane_info::to_string( int count, std::string& desc, && !tso_unchivalric_attack_safe_monster(m_mon) && is_unchivalric_attack(&you, m_mon)) { - desc_color = MAGENTA; + desc_color = Options.evil_colour; } break; default: |