unsplitting split object stack

Replace the code that Dean objected to with something a little bit more
robust.  It doesn't rely on the two stacks being adjacent or having the
same inventory letter.  It is still vulnerable to having another
splitobj() occur between the offending split and its attempted unsplit,
or to either of the two halves of a split being extracted from their
object chain.  As before, failure to unsplit only results in the two
halves of the split remaining separate stacks, not anything more drastic
like the panic() that prompted all this.

Simplification of hallucinated currency names got mixed in with this
patch.  I haven't bothered separating it back out.

Whoever reset PATCHLEVEL to 0 jumped the gun.  This patch increments it
since change to the 'context' structure breaks save file compatibility,
so it will need to undergo another reset before release.
This commit is contained in:
PatR
2015-10-18 17:37:15 -07:00
parent ab5cafaa62
commit 2c20805b16
8 changed files with 169 additions and 83 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.107 $ */
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1445215015 2015/10/19 00:36:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.109 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -8,7 +8,7 @@
/*
* PATCHLEVEL is updated for each release.
*/
#define PATCHLEVEL 0
#define PATCHLEVEL 1
/*
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.