summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/docs/level_design.txt3
-rw-r--r--crawl-ref/source/dat/clua/ziggurat.lua3
-rw-r--r--crawl-ref/source/dat/icecave.des2
-rw-r--r--crawl-ref/source/dat/sewer.des2
-rw-r--r--crawl-ref/source/overmap.cc35
-rw-r--r--crawl-ref/source/tags.cc5
6 files changed, 41 insertions, 9 deletions
diff --git a/crawl-ref/docs/level_design.txt b/crawl-ref/docs/level_design.txt
index 12c1122398..bad23ccb26 100644
--- a/crawl-ref/docs/level_design.txt
+++ b/crawl-ref/docs/level_design.txt
@@ -1323,7 +1323,8 @@ abbreviation with dgn.set_set_level_name_abbrev().
Known portal vault entries will be displayed on the overmap. By default
the name shown on the overmap will be the "dstname" parameter, or if
that isn't present the "dst" paremeter. It can be set to something else
-with the "dstovermap" parameter.
+with the "overmap" parameter. A note can be made to accompany the
+portal's position on the overmap with the "overmap_note" parameter.
This will produce a portal, but attempting to use it will trigger an
ASSERT since there's no map for the destination. So we create a
diff --git a/crawl-ref/source/dat/clua/ziggurat.lua b/crawl-ref/source/dat/clua/ziggurat.lua
index f769882015..c01136a8cb 100644
--- a/crawl-ref/source/dat/clua/ziggurat.lua
+++ b/crawl-ref/source/dat/clua/ziggurat.lua
@@ -87,8 +87,9 @@ function ziggurat_portal(e)
amount = entry_fee,
toll_desc = "to enter a ziggurat",
desc = "gateway to a ziggurat",
+ overmap = "Ziggurat",
+ overmap_note = "" .. entry_fee .. " gp",
dst = "ziggurat",
- dstovermap = "Ziggurat",
dstname = "Ziggurat:1",
dstname_abbrev = "Zig:1",
dstorigin = "on level 1 of a ziggurat",
diff --git a/crawl-ref/source/dat/icecave.des b/crawl-ref/source/dat/icecave.des
index e258591c83..33c5df18c5 100644
--- a/crawl-ref/source/dat/icecave.des
+++ b/crawl-ref/source/dat/icecave.des
@@ -29,8 +29,8 @@ function ice_cave_portal(e)
dst = "ice_cave",
dstname = "Ice Cave",
dstname_abbrev = "IceCv",
- dstovermap = "frozen archway",
dstorigin = "in an ice cave",
+ overmap = "frozen archway",
floor = "stone_arch" }]])
e.kfeat("O = enter_portal_vault")
e.colour("O = white")
diff --git a/crawl-ref/source/dat/sewer.des b/crawl-ref/source/dat/sewer.des
index f68e93ec8b..256520750a 100644
--- a/crawl-ref/source/dat/sewer.des
+++ b/crawl-ref/source/dat/sewer.des
@@ -17,8 +17,8 @@
function sewer_portal(e)
e.marker([[O = lua:one_way_stair { desc = "A glowing drain",
dst = "sewer",
- dstovermap = "glowing drain",
dstorigin = "in the sewers",
+ overmap = "glowing drain",
floor = "stone_arch" }]])
e.kfeat("O = enter_portal_vault")
e.colour("O = lightgreen")
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index b945877a0e..f341bef7a6 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -40,6 +40,7 @@ typedef std::map<level_pos, shop_type> shop_map_type;
typedef std::map<level_pos, god_type> altar_map_type;
typedef std::map<level_pos, portal_type> portal_map_type;
typedef std::map<level_pos, std::string> portal_vault_map_type;
+typedef std::map<level_pos, std::string> portal_note_map_type;
// NOTE: The value for colours here is char rather than unsigned char
// because g++ needs it to be char for marshallMap in tags.cc to
// compile properly.
@@ -51,6 +52,7 @@ shop_map_type shops_present;
altar_map_type altars_present;
portal_map_type portals_present;
portal_vault_map_type portal_vaults_present;
+portal_note_map_type portal_vault_notes;
portal_vault_colour_map_type portal_vault_colours;
annotation_map_type level_annotations;
@@ -268,14 +270,33 @@ static std::string _portal_vaults_description_string()
disp += ':';
}
- if ( ci_portals->first.id == last_id )
- disp += '*';
+ const level_id lid = ci_portals->first.id;
+ const level_pos where = ci_portals->first;
+
+ if ( lid == last_id )
+ {
+ if (!portal_vault_notes[where].empty())
+ {
+ disp += " (";
+ disp += portal_vault_notes[where];
+ disp += ")";
+ }
+ else
+ disp += '*';
+ }
else
{
disp += ' ';
- disp += ci_portals->first.id.describe(false, true);
+ disp += lid.describe(false, true);
+
+ if (!portal_vault_notes[where].empty())
+ {
+ disp += " (";
+ disp += portal_vault_notes[where];
+ disp += ") ";
+ }
}
- last_id = ci_portals->first.id;
+ last_id = lid;
}
}
if ( last_id.depth != 10000 )
@@ -524,6 +545,7 @@ static bool unnotice_portal(const level_pos &pos)
static bool unnotice_portal_vault(const level_pos &pos)
{
(void) find_erase(portal_vault_colours, pos);
+ (void) find_erase(portal_vault_notes, pos);
return find_erase(portal_vaults_present, pos);
}
@@ -648,7 +670,7 @@ void seen_other_thing( dungeon_feature_type which_thing, const coord_def& pos )
{
std::string portal_name;
- portal_name = env.markers.property_at(pos, MAT_ANY, "dstovermap");
+ portal_name = env.markers.property_at(pos, MAT_ANY, "overmap");
if (portal_name.empty())
portal_name = env.markers.property_at(pos, MAT_ANY, "dstname");
if (portal_name.empty())
@@ -666,6 +688,9 @@ void seen_other_thing( dungeon_feature_type which_thing, const coord_def& pos )
col = get_feature_def(which_thing).colour;
portal_vault_colours[where] = (char) element_colour(col, true);
+ portal_vault_notes[where] =
+ env.markers.property_at(pos, MAT_ANY, "overmap_note");
+
break;
}
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 8c8af99ade..89642b4ce8 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -92,6 +92,7 @@ extern std::map<level_pos, shop_type> shops_present;
extern std::map<level_pos, god_type> altars_present;
extern std::map<level_pos, portal_type> portals_present;
extern std::map<level_pos, std::string> portal_vaults_present;
+extern std::map<level_pos, std::string> portal_vault_notes;
extern std::map<level_pos, char> portal_vault_colours;
extern std::map<level_id, std::string> level_annotations;
@@ -1144,6 +1145,8 @@ static void tag_construct_you_dungeon(writer &th)
marshall_level_pos, marshall_as_long<portal_type>);
marshallMap(th, portal_vaults_present,
marshall_level_pos, marshallStringNoMax);
+ marshallMap(th, portal_vault_notes,
+ marshall_level_pos, marshallStringNoMax);
marshallMap(th, portal_vault_colours,
marshall_level_pos, marshallByte);
marshallMap(th, level_annotations,
@@ -1597,6 +1600,8 @@ static void tag_read_you_dungeon(reader &th)
unmarshall_level_pos, unmarshall_long_as<portal_type>);
unmarshallMap(th, portal_vaults_present,
unmarshall_level_pos, unmarshallStringNoMax);
+ unmarshallMap(th, portal_vault_notes,
+ unmarshall_level_pos, unmarshallStringNoMax);
unmarshallMap(th, portal_vault_colours,
unmarshall_level_pos, unmarshallByte);
unmarshallMap(th, level_annotations,