]> granicus.if.org Git - nethack/commit
unsplitting split object stack
authorPatR <rankin@nethack.org>
Mon, 19 Oct 2015 00:37:15 +0000 (17:37 -0700)
committerPatR <rankin@nethack.org>
Mon, 19 Oct 2015 00:37:15 +0000 (17:37 -0700)
commit2c20805b16fdd74eb37a5639a7d018d5e09dadb4
treec8e25f899e1cd1a7de22b7404bfee9fcb3e729c5
parentab5cafaa6270894869e7d4ac4ded52a10b50a9ec
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.
include/context.h
include/extern.h
include/patchlevel.h
src/allmain.c
src/dothrow.c
src/invent.c
src/mkobj.c
src/mon.c