]> granicus.if.org Git - nethack/commit
BONES_POOLS fix and bonesid fix
authorPatR <rankin@nethack.org>
Mon, 21 Aug 2017 09:50:26 +0000 (02:50 -0700)
committerPatR <rankin@nethack.org>
Mon, 21 Aug 2017 09:50:26 +0000 (02:50 -0700)
commiteadecb1bafb58bc15454e611178b9a65dbf46e07
tree8f2b62a3ccff06df1e91ff5b2f3e8e0998ab66c4
parent73d36b59ddacdc8b4487a5d991582ca70ecee4c0
BONES_POOLS fix and bonesid fix

The BONES_POOLS implementation added an extra dot to the bones file
name (only when enabled) which would be a problem on some filesystems.
This changes the name from "bonD0.15.3" to "bon3D0.15" which avoids
the second dot and also fits within 8.3 characters.  To enforce that,
the maximum value for BONES_POOLS is now 10 (yielding single-digit pool
numbers 0 through 9).

BONES_POOLS==1 will omit the pool number (that's not a change, just a
reminder), yielding "bonD0.15" and so on.  Right now, BONES_POOLS==0
is equivalent to BONES_POOLS=1, but it could be changed someday to
mean that bones files shouldn't be used if we decide to support that.

The pool number as a suffix was being included in content validation,
so it wasn't possible to move "bonD0.15.3" to pool 2 by renaming it to
"bonD0.15.2".  I'm not sure whether that was intentional, but it seems
overly draconian.  "bon3D0.15" can be renamed to "bon2D0.15" and then
be loaded by a game assigned to pool 2.  Also, pre-pool bones can be
retained by renaming to any valid pool and should still work.

The three letter filecode for quest bones has made the bonesid be
broken since 3.3.0 introduced it (the three letter code, not bones-id).
"QArc.2" for level 2 of the Archeologist quest was being written into
the bones file as "rc.2", but worked as intended because validation
when loading bones had the same mistake.  This fixes it to use "QArc.2"
when saving and accept either "QArc.2" or "rc.2" when loading, so 3.6.0
bones files (and existing to-be-3.6.1 bones) will continue to work.
doc/fixes36.1
src/bones.c
src/files.c