]> granicus.if.org Git - nethack/commitdiff
gameover
authornethack.rankin <nethack.rankin>
Mon, 10 Mar 2003 23:43:28 +0000 (23:43 +0000)
committernethack.rankin <nethack.rankin>
Mon, 10 Mar 2003 23:43:28 +0000 (23:43 +0000)
     The recent bones panic included "program initialization failed"
during final rundown.  The cause of the panic has already been fixed;
this fixes the silly message that was delivered with it.

     Also, disclose the contents of carried statues along with normal
containers when the game ends.

doc/fixes34.2
src/end.c

index d5547fc14c9758e476837498b9d49051eb8f306d..dca8823c1bef7f9ed78afa5ed05e5368f4db5854 100644 (file)
@@ -10,6 +10,9 @@ if only one monster in a monster-vs-monster fight is visible, show an I symbol
        for the other one whether it is an attacker or defender
 display "It" and not "The invisible <pet>" when an invisible pet eats food.
 include a hint about expected input when prompting for musical notes
+don't report "program initialization failed" if a panic occurs after the
+       game is over
+include statue contents in end of game inventory disclosure
 
 
 Platform- and/or Interface-Specific Fixes
index cc389b9ece7c0f341eca8e9772fcb5378cb4df9b..d7902e2103ae20cbfa9abf9ace2f686b19e6b6d0 100644 (file)
--- a/src/end.c
+++ b/src/end.c
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)end.c      3.4     2003/01/08      */
+/*     SCCS Id: @(#)end.c      3.4     2003/03/10      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -264,7 +264,9 @@ panic VA_DECL(const char *, str)
            iflags.window_inited = 0; /* they're gone; force raw_print()ing */
        }
 
-       raw_print(!program_state.something_worth_saving ?
+       raw_print(program_state.gameover ?
+                 "Postgame wrapup disrupted." :
+                 !program_state.something_worth_saving ?
                  "Program initialization has failed." :
                  "Suddenly, the dungeon collapses.");
 #if defined(WIZARD) && !defined(MICRO)
@@ -919,8 +921,10 @@ boolean identified, all_containers;
        char buf[BUFSZ];
 
        for (box = list; box; box = box->nobj) {
-           if (Is_container(box) && box->otyp != BAG_OF_TRICKS) {
-               if (box->cobj) {
+           if (Is_container(box) || box->otyp == STATUE) {
+               if (box->otyp == BAG_OF_TRICKS) {
+                   continue;   /* wrong type of container */
+               } else if (box->cobj) {
                    winid tmpwin = create_nhwindow(NHW_MENU);
                    Sprintf(buf, "Contents of %s:", the(xname(box)));
                    putstr(tmpwin, 0, buf);