diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-05-09 19:46:15 +0100 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-05-11 06:08:49 +0100 |
commit | 963c9f65ab9d64f033abce225cba0fa90bbb6a1f (patch) | |
tree | f2dbce3c832ae9e7925f85bf484c61ddc630faf0 /crawl-ref/source/status.cc | |
parent | c6d5b38e8af98394f150fae25c4dd136a332909d (diff) | |
download | crawl-ref-963c9f65ab9d64f033abce225cba0fa90bbb6a1f.tar.gz crawl-ref-963c9f65ab9d64f033abce225cba0fa90bbb6a1f.zip |
Only display the Bribe status light while in a branch that is being bribed
Lists of any other bribed branches are still visible on @ and %.
Diffstat (limited to 'crawl-ref/source/status.cc')
-rw-r--r-- | crawl-ref/source/status.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crawl-ref/source/status.cc b/crawl-ref/source/status.cc index 133963e97f..d37c26a2da 100644 --- a/crawl-ref/source/status.cc +++ b/crawl-ref/source/status.cc @@ -680,23 +680,24 @@ bool fill_status_info(int status, status_info* inf) vector<string> places; for (int i = 0; i < NUM_BRANCHES; i++) { - if (bribe < branch_bribe[i]) - bribe = branch_bribe[i]; if (branch_bribe[i] > 0) { + if (player_in_branch(static_cast<branch_type>(i))) + bribe = branch_bribe[i]; + places.push_back(branches[static_cast<branch_type>(i)] .longname); } } - if (bribe == 0) - break; - - inf->light_colour = (bribe >= 2000) ? WHITE : - (bribe >= 1000) ? LIGHTBLUE - : BLUE; + if (bribe > 0) + { + inf->light_colour = (bribe >= 2000) ? WHITE : + (bribe >= 1000) ? LIGHTBLUE + : BLUE; - inf->light_text = "Bribe"; + inf->light_text = "Bribe"; + } inf->short_text = make_stringf("bribing [%s]", comma_separated_line(places.begin(), places.end(), |