level file handling and trickery feedback
1) consolidate all core usage of `errno' in files.c; 2) give more feedback for any failure by create_levelfile or open_levelfile, similar to what was being done for problems during level change; 3) include trickery info in paniclog (many instances of "trickery" seem to be due to disk or quota problems rather than user misbehavior...). The create_levelfile call in pcmain probably ought to be changed to use error feedback, but in the meantime this should continue working. Perhaps error() should be modified to update paniclog too, but I didn't want to go through all its port-specific incarnations making changes.
This commit is contained in:
22
src/end.c
22
src/end.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)end.c 3.4 2001/09/24 */
|
||||
/* SCCS Id: @(#)end.c 3.4 2002/08/22 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -549,6 +549,19 @@ int how;
|
||||
struct obj *corpse = (struct obj *)0;
|
||||
long umoney;
|
||||
|
||||
if (how == TRICKED) {
|
||||
if (killer) {
|
||||
paniclog("trickery", killer);
|
||||
killer = 0;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
You("are a very tricky wizard, it seems.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* kilbuf: used to copy killer in case it comes from something like
|
||||
* xname(), which would otherwise get overwritten when we call
|
||||
* xname() when listing possessions
|
||||
@@ -561,12 +574,7 @@ int how;
|
||||
killer_format = KILLED_BY;
|
||||
Strcpy(kilbuf, (!killer || how >= PANICKED ? deaths[how] : killer));
|
||||
killer = kilbuf;
|
||||
#ifdef WIZARD
|
||||
if (wizard && how == TRICKED) {
|
||||
You("are a very tricky wizard, it seems.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (how < PANICKED) u.umortality++;
|
||||
if (Lifesaved && (how <= GENOCIDED)) {
|
||||
pline("But wait...");
|
||||
|
||||
Reference in New Issue
Block a user