questpgr support for special level arrival messages (trunk only)

Suggested by <email deleted>.  The level compiler allows
MESSAGE directives to provide text given upon initial entry to particular
levels.  Modify the code that delivers them to support quest pager text
substitution.  It could also be tweaked to support deliver-by-popup-window
in addition to deliver-by-pline, but I didn't go that far.

     He also suggested revising the message for the Plane of Air, but it
seems ok to me.  Instead, I've changed the message for the Astral Plane to
announce that it holds "the High Temple of <your deity>" rather than the
quite lame "the High Temples of the aligned gods".
This commit is contained in:
nethack.rankin
2007-03-03 04:51:47 +00:00
parent 23eb08a462
commit e3229e6d3b
4 changed files with 38 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)mkmaze.c 3.5 2006/05/09 */
/* SCCS Id: @(#)mkmaze.c 3.5 2007/03/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -7,7 +7,6 @@
#include "lev.h" /* save & restore info */
/* from sp_lev.c, for fixup_special() */
extern char *lev_message;
extern lev_region *lregions;
extern int num_lregions;
@@ -480,26 +479,6 @@ fixup_special()
num_lregions = 0;
}
/* special levels can include a custom arrival message; display it */
void
deliver_splev_message()
{
char *str, *nl;
/* this used to be inline within fixup_special(),
but then the message ended up being given too soon */
if (lev_message) {
for (str = lev_message; (nl = index(str, '\n')) != 0; str = nl + 1) {
*nl = '\0';
pline("%s", str);
}
if (*str)
pline("%s", str);
free((genericptr_t)lev_message);
lev_message = 0;
}
}
void
makemaz(s)
register const char *s;