diff options
author | Neil Moore <neil@s-z.org> | 2012-09-06 10:51:00 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-09-14 09:33:28 -0400 |
commit | 468f6c3f88cfb84fc3af9171f71c32c7a105b06f (patch) | |
tree | 3b87205d2a98cbdb0a954dc903d1aeae449c45f9 /crawl-ref/source/externs.h | |
parent | 65aa13110207544d7e21662b468c142ecf8276fd (diff) | |
download | crawl-ref-468f6c3f88cfb84fc3af9171f71c32c7a105b06f.tar.gz crawl-ref-468f6c3f88cfb84fc3af9171f71c32c7a105b06f.zip |
Saner rc list options, including reset.
We now support "listopt =" to clear the list, and support "-=" with many
more options. We also warn when "listopt = foo" is interpreted to mean
"append", because that is likely to change in 0.12.
These changes are intended to go into 0.11, but we'll need to update the
options guide first.
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r-- | crawl-ref/source/externs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 056e40ebef..25fb783e9a 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -700,6 +700,11 @@ struct message_filter message_filter(const string &s) : channel(-1), pattern(s, true) { } + bool operator== (const message_filter &mf) const + { + return channel == mf.channel && pattern == mf.pattern; + } + bool is_filtered(int ch, const string &s) const { bool channel_match = ch == channel || channel == -1; @@ -714,6 +719,10 @@ struct sound_mapping { text_pattern pattern; string soundfile; + bool operator== (const sound_mapping &o) const + { + return pattern == o.pattern && soundfile == o.soundfile; + } }; struct colour_mapping @@ -721,6 +730,10 @@ struct colour_mapping string tag; text_pattern pattern; int colour; + bool operator== (const colour_mapping &o) const + { + return tag == o.tag && pattern == o.pattern && colour == o.colour; + } }; struct message_colour_mapping |