summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-overview.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-05-14 14:45:28 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-05-15 13:07:28 +0200
commit919270b38deb33ce6b21e57796992ccbd753dc55 (patch)
tree09029b86de30c12906491d9409cae9e7fc9676ef /crawl-ref/source/dgn-overview.cc
parent4ced95433dc9a798c729eda68df69be8d77a96de (diff)
downloadcrawl-ref-919270b38deb33ce6b21e57796992ccbd753dc55.tar.gz
crawl-ref-919270b38deb33ce6b21e57796992ccbd753dc55.zip
Allow annotating portal levels.
Useful, for example, if you enter a Ziggurat from Pan, and want to remind yourself to take items you stashed on the way back. The annotation goes away when the level in question is deleted.
Diffstat (limited to 'crawl-ref/source/dgn-overview.cc')
-rw-r--r--crawl-ref/source/dgn-overview.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/crawl-ref/source/dgn-overview.cc b/crawl-ref/source/dgn-overview.cc
index 7faaa9db1a..db4eb357ec 100644
--- a/crawl-ref/source/dgn-overview.cc
+++ b/crawl-ref/source/dgn-overview.cc
@@ -1005,19 +1005,11 @@ void annotate_level()
{
li2 = level_id::get_next_level_id(you.pos());
- if (!is_connected_branch(li2) || li2.depth <= 0)
+ if (li2.depth <= 0)
li2 = level_id::current();
}
- if (!player_in_connected_branch() && !is_connected_branch(li2))
- {
- mpr("You can't annotate this level.");
- return;
- }
-
- if (!player_in_connected_branch())
- li = li2;
- else if (li2 != level_id::current())
+ if (li2 != level_id::current())
{
if (yesno("Annotate level on other end of current stairs?", true, 'n'))
li = li2;
@@ -1053,6 +1045,11 @@ void do_annotate(level_id& li)
}
}
+void clear_level_annotation(level_id li)
+{
+ level_annotations.erase(li);
+}
+
void marshallUniqueAnnotations(writer& outf)
{
marshallShort(outf, auto_unique_annotations.size());