# # Patch name: roomntn # Patch version: 1 # Author's name: Flame # Author's email: flame@access.kuwait.net # Version of PennMUSH: 169-p8 # Date patch made: 14-11-1996 # Author is willing to support (yes/no): no # Patch format: diff -c # # # This is a contributed PennMUSH patch. Its use is subject to the # same restrictions found in PennMUSH's hdrs/copyrite.h file. # # No warranty is given for this patch. It is not necessarily going # to work on your system, with any version of PennMUSH other than # the one above, etc. # # If the author given above was willing to support the patch, you # should write to the author if you have any questions or problems. Do # *NOT* send email messages to Javelin or any PennMUSH mailing list about # this patch! # # Below this line is the author's description of the patch, # followed by the patch itself. If the patch is in context diff # format, you'll probably apply it by typing: patch < patchfile # in your top-level MUSH directory, unless instructed otherwise # below. # [This patch appears to require the other NTN patches - Javelin ] You can now add NTN attribute to rooms. NTN here will also be evaluated. Example: &ntn here=[ansi(hg,North east Palace)] look Home North east palace <-(in green) *** src/look.orig Thu Nov 14 22:54:58 1996 --- src/look.c Thu Nov 14 22:56:24 1996 *************** *** 360,366 **** * 4 -- remote look, though a CLOUDY (!TRANS) exit: contents only */ ! ATTR *s; char tbuf1[BUFFER_LEN], *bp; char const *asave, *ap; --- 360,366 ---- * 4 -- remote look, though a CLOUDY (!TRANS) exit: contents only */ ! ATTR *s, *b; char tbuf1[BUFFER_LEN], *bp; char const *asave, *ap, *c; *************** *** 362,368 **** ATTR *s; char tbuf1[BUFFER_LEN], *bp; ! char const *asave, *ap; if (loc == NOTHING) return; --- 362,368 ---- ATTR *s, *b; char tbuf1[BUFFER_LEN], *bp; ! char const *asave, *ap, *c; if (loc == NOTHING) return; *************** *** 366,372 **** if (loc == NOTHING) return; ! /* don't give the unparse if looking through Transparent exit */ if ((flag == 0) || (flag == 2)) notify(player, unparse_object(player, loc)); --- 366,372 ---- if (loc == NOTHING) return; ! b = 0; /* don't give the unparse if looking through Transparent exit */ if ((flag == 0) || (flag == 2)) b = (ATTR *) atr_get_noparent(loc, "NTN"); *************** *** 369,375 **** /* don't give the unparse if looking through Transparent exit */ if ((flag == 0) || (flag == 2)) ! notify(player, unparse_object(player, loc)); if (Typeof(loc) != TYPE_ROOM) { if ((flag != 2) || !Terse(player)) { if ((s = atr_get(loc, "IDESCRIBE")) || --- 369,386 ---- b = 0; /* don't give the unparse if looking through Transparent exit */ if ((flag == 0) || (flag == 2)) ! b = (ATTR *) atr_get_noparent(loc, "NTN"); ! if (b !=NULL) ! { ! c = (char *) uncompress(b->value); ! ap = c; ! bp = tbuf1; ! process_expression(tbuf1, &bp, &ap, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); ! *bp = '\0'; ! notify(player, tprintf("%s %s",unparse_object(player, loc),tbuf1)); ! } ! else ! notify(player, tprintf("%s",unparse_object(player, loc))); if (Typeof(loc) != TYPE_ROOM) { if ((flag != 2) || !Terse(player)) { if ((s = atr_get(loc, "IDESCRIBE")) ||