diff options
author | Neil Moore <neil@s-z.org> | 2014-08-07 23:29:53 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-08-07 23:29:53 -0400 |
commit | ead039468edb737c2a52e39911036e82be9e6224 (patch) | |
tree | f395976d867052047e314d9cf9eaf2eac966148f | |
parent | 353c5feaf5d9362234493de1426d2d0fb3761d16 (diff) | |
download | crawl-ref-ead039468edb737c2a52e39911036e82be9e6224.tar.gz crawl-ref-ead039468edb737c2a52e39911036e82be9e6224.zip |
Handle Esc properly for &_ and zotdef aL.
This does remove the "doesn't seem to be taking followers" message
when misspelling a god name, but keeps it when trying to choose Fedhas.
More importantly, it makes wizmode &_<esc> not abandon one's god.
-rw-r--r-- | crawl-ref/source/religion.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/zotdef.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 195701706f..b3342f1bbf 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3725,7 +3725,7 @@ god_type choose_god() msgwin_get_line("Which god (by name)? ", specs, sizeof(specs)); if (specs[0] == '\0') - return GOD_NO_GOD; + return NUM_GODS; string spec = lowercase_string(specs); diff --git a/crawl-ref/source/zotdef.cc b/crawl-ref/source/zotdef.cc index c3dc83c163..a0e7e89620 100644 --- a/crawl-ref/source/zotdef.cc +++ b/crawl-ref/source/zotdef.cc @@ -926,10 +926,11 @@ bool zotdef_create_altar() god_type god = choose_god(); - if (god == GOD_NO_GOD) + // "No god" or a bad god name (including pressing escape) + if (god == GOD_NO_GOD || god == NUM_GODS) return false; - if (god == NUM_GODS || !_can_make_altar(god)) + if (!_can_make_altar(god)) { mpr("That god doesn't seem to be taking followers today."); return false; |