summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-27 05:26:45 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-27 05:26:45 +0000
commit158387451269b0a382b98c7a9ec508e3f9e33514 (patch)
tree46cc661d967ef4b6d87d6092f8f17c97d2050147 /crawl-ref/source
parent9056ed35e126e573487ed4f43891376cb8248381 (diff)
downloadcrawl-ref-158387451269b0a382b98c7a9ec508e3f9e33514.tar.gz
crawl-ref-158387451269b0a382b98c7a9ec508e3f9e33514.zip
Changed "dstovermap" portal vault entrance parameter to "overmap".
New portal vault entrance parameter "overmap_note" can be used to associate a note with a particular entrance on the overmap display. The overmap display now notes entry fee for each known ziggurat. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7647 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-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
5 files changed, 39 insertions, 8 deletions
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,