diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-24 05:05:29 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-24 05:05:29 +0000 |
commit | 87b16bb06d3f693ec3f6d727a50bdadf4df5c138 (patch) | |
tree | ad3445cac5278e9fa8c422f09d88639935159894 /crawl-ref/source/tags.cc | |
parent | 7facfd7958a3f544d702f12310b4d5f40563641b (diff) | |
download | crawl-ref-87b16bb06d3f693ec3f6d727a50bdadf4df5c138.tar.gz crawl-ref-87b16bb06d3f693ec3f6d727a50bdadf4df5c138.zip |
For items that originate in a portal vault, store the string describing
their origin place in "portal_vault_origin" in the item's prop hash table,
so that (for example) an item bought in a bazaar will display its origin
as "in a bazaar" after exiting the bazaar, instead of "in a Portal Vault".
The string can be made different than the default with the "dstorigin"
property of the entrance portal marker, or via the lua function
dgn.set_level_type_origin().
Ziggurat items now say "on level X of a ziggurat", and sewer items
"in the sewers", with other portal vaults using the default.
Breaks savefile compatibilty.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7577 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r-- | crawl-ref/source/tags.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index a03e3f1d98..34f510109b 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -852,6 +852,7 @@ static void tag_construct_you(writer &th) marshallLong(th, you.sage_bonus_degree); marshallByte(th, you.level_type); marshallString(th, you.level_type_name); + marshallString(th, you.level_type_origin); marshallString(th, you.level_type_tag); marshallByte(th, you.entry_cause); marshallByte(th, you.entry_cause_god); @@ -1249,7 +1250,10 @@ static void tag_read_you(reader &th, char minorVersion) you.level_type_name = unmarshallString(th); if (minorVersion >= TAG_MINOR_LUADGN) - you.level_type_tag = unmarshallString(th); + { + you.level_type_origin = unmarshallString(th); + you.level_type_tag = unmarshallString(th); + } you.entry_cause = static_cast<entry_cause_type>( unmarshallByte(th) ); you.entry_cause_god = static_cast<god_type>( unmarshallByte(th) ); |