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
CI2RMLJLIAZMEGNN6LJN6PSHXHLPG7PXFIDYRGFPVMDPJ2R4S4NQC UNIJHT5L4GDN6L4WM2GQ6TZO3R6SRIHJ7XURBSNC4LF7JMYMWRFAC EAIW6N55NH45Z2N6RQKBQIIN2LKDEE3LET5QREKSZJ4ONCQJKAEQC 4N5PW5S3OV25HFN634NNWMMYX26NA2TB6TVFG4UMYSZ2VBJWKE4QC TLO257LZSB6ZO36STDUEWJBO2LETXFKTFGXELA6Y4BZBVAEIIINAC X7MFMKQTNZ2IWBFVGS6WQV7NRNKJ3DWQAW2X7IQMFQQXW24AHPZQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC VXSORUQOM2VZA4CAZDC6KPAY373NQIN3UT7CXQXTRCYXO2WM62DAC 5BJPWUPLJFS34FUTFJVKA4A52YMIGV6EWDXLNSDCWBJWBGVSQFGQC AUXHSGS4EFOPZ6TVZYWNVOUDO7NYKUKE3HBKGQQWTALSVFOE3HAAC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC RX6575DZOHRUXQUZH34YZGPZJF4STUPLBQDIVTINA2L6LVCKRIGQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC H3552BCIAVBLKAYKE4DHFLBLFW5RGRMYBMRRYHYEB5IPIJRUVU5QC NKONHW4JNY6HP2M63MNPM3H64ZWSUNUT5FX2STW4KTS4AMXJXXVQC KTRWLM6WDL4GAAJZNLQEEA3TGY2OKYZZUAAT4TCAVKRTR2NQBWUQC R6XS2HO5QX2FJUGL5UQQRNETKCMYWTUFPHPPS5SYWK3OQA4UDUQQC 7FUW7VHYYS2URT45THZ7NJ7NC6JMNGQXJJZ34SPPTBFQHH6RQOJAC BPPMLLPJLP6W2LZSPAMOMYA7YWCIFJTNNL3XBWU2MRHAQBZ5M4XAC if (!neworigin.empty())you.level_type_origin = neworigin;else if (!you.level_type_name.empty()){std::string lname = lowercase_string(you.level_type_name);std::string article, prep;if (starts_with(lname, "level "))prep = "on ";elseprep = "in ";if (starts_with(lname, "a ") || starts_with(lname, "an ")|| starts_with(lname, "the ") || starts_with(lname, "level ")){; // Doesn't need an article}else{char letter = you.level_type_name[0];if (isupper(letter))article = "the ";else if (is_vowel(letter))article = "an ";elsearticle = "a ";}you.level_type_origin = prep + article + you.level_type_name;}
}LUAFN(dgn_set_level_type_origin){if (you.level_type != LEVEL_PORTAL_VAULT){luaL_error(ls, "Can only set level type origin on portal vaults");return(0);}if (!lua_isstring(ls, 1)){luaL_argerror(ls, 1, "Expected string for level type origin");return(0);}you.level_type_origin = luaL_checkstring(ls, 1);return(0);
Portal vaults can be particularly thematic, using specialised monstersets, fitting loot, coloured dungeon features etc. Avoid death traps;it is no fun to enter a vault, unable to leave and be killed outright.Randomise in order to provide fun and reduce spoiler effects. For portalvaults, it is desirable to have several different layouts (ideally eachof the maps has some randomisation on its own). Often, it is a good ideato skew the map distribution: e.g. with four destination vaults, weightslike 40,30,20,10 might be more interesting than 25,25,25,25.
If you want the place name displayed while in the vault to be differentthan the destination name, then you can give one_way_stair() a "dstname"parameter. If you want the place origin for items in a characterdump to be different than the default you can give one_way_stair a"dstorigin" parameter (i.e., dstname = "garden", dstorigin = "in the gardens").You can dynamically change the origin string using the lua functiondgn.set_level_type_origin().