diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-20 05:27:28 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-20 05:27:28 +0000 |
commit | 90e4386f60d35d54fefa08a5f5266499e1a6e529 (patch) | |
tree | ab94d485c627d2beebcd0fd948c09eea22a96694 /crawl-ref/source/files.cc | |
parent | ee3bb90a15c95e9c8c59805ad4b2e4edb334f288 (diff) | |
download | crawl-ref-90e4386f60d35d54fefa08a5f5266499e1a6e529.tar.gz crawl-ref-90e4386f60d35d54fefa08a5f5266499e1a6e529.zip |
When causing dungeon-wide effects for Nemelex and Beogh abandonment,
only display the associated messages if the effects actually changed
something.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3305 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index f21f792461..f9444b77f6 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -1461,7 +1461,7 @@ void restore_game(void) } } -void apply_to_all_dungeons(void (*applicator)()) +bool apply_to_all_dungeons(bool (*applicator)()) { const branch_type original_branch = you.where_are_you; const int original_level = you.your_level; @@ -1472,7 +1472,7 @@ void apply_to_all_dungeons(void (*applicator)()) const coord_def old_pos(you.pos()); // Apply to current level, then save it out. - applicator(); + bool success = applicator(); save_level(original_level, original_type, original_branch); you.level_type = LEVEL_DUNGEON; @@ -1516,6 +1516,8 @@ void apply_to_all_dungeons(void (*applicator)()) load( DNGN_STONE_STAIRS_DOWN_I, LOAD_VISITOR, original_type, original_level, original_branch ); + + return success; } static bool determine_version( FILE *restoreFile, |