Reported directly to devteam, the POSIX_TYPES subset (most? all
these days?) of Unix that defines USE_FCNTL was unlocking lock file
'perm' when done with it but wasn't explicitly closing it unless
the unlocking failed. Triggered a valgrind complaint and could have
posed a problem if restart gets implemented for this configuraiton.
Feedback when playing music while hallucinating misspelled
"butterflies".
Other bits in the same code (not part of #H9407):
All feedback messages while impaired gave "You produce <something>"
which was immediately followed by many of the instruments giving
their own "You produce <some other thing>." Change the verb for the
playing-while-impaired messages to avoid having two consecutive
"you produce" ones.
Also, multiple impairments (two or more of stunned, confused, and
hallucinating) always gave the generic "what you produce is far
from music" message. Have them sometimes ignore excess impairments
to give the message for one of those.
Game is playable, and should compile on linux and Windows.
Assumes you have a lua 5.3 library available.
Removes level compiler and associated files.
Replaces special level des-files with lua scripts.
Exposes some NetHack internals to lua:
- des-table with commands to create special levels
- nh-table with NetHack core commands
- nhc-table with some constants
- u-table with some player-specific data (u-struct)
- selection userdata
Adds some rudimentary tests.
Adds new extended command #wizloadlua to run a specific script,
and #wizloaddes to run a specific level-creation script.
nhlib.lua is loaded for every lua script.
Download and untar lua:
mkdir lib
cd lib
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
tar zxf lua-5.3.5.tar.gz
Then make nethack normally.
Wizard mode shows the number of points needed to reach the next level
(unless already maxxed out at 30) for ^X and end of game disclosure.
Do it in normal play for the latter too. (I think it would ok to do
that for ^X too but haven't gone that far.)
Even when it was wizard mode only, the phrasing for past tense had a
minor grammar bug, and it could make the line a little too long for
tty and curses (not sure about others) when level was high, resulting
in wrapped text. That looked bad for tty, which first tries removing
indentation (just 1 space in this case), making that line outdented
as well as wrapped. So change the phrasing slightly when experience
level is 'too high'. I had a version which formatted, measured, and
re-formatted if necessary but that was overkill; simple hardcoded
rephrasing suffices particularly when measuring was against assumed
display width (80) rather than actual width.
Turns the "fix" in commit 319dcf4746
handled removing the default answer for single-line-prompt plus
multi-line-answer but not for multi-line-prompt plus long-enough-
answer-to-reach-another-line. The logic wasn't quite right and I
misunderstood what is stored in linestarts[] so even correct logic
wouldn't have solved things.
Symbol set changes...
curses:
S_tree (use plus-or-minus sign instead of accidental horizontal line);
S_bars (switch from default '#' to not-equals sign);
DECgraphics:
S_altar (switch from default '_' to 'pi');
S_bars (switch from 'pi' to not-equals sign);
DECgraphics_2: get rid of this commented out set since its contents are
now folded into DECgraphics.
(The IBMgraphics one is just whitespace; delete a <space> that precedes
a <tab>.)
Flag existing occurrences of "You hear" as "Deaf-aware" so
that a grep for that string in the future doesn't need to
trigger further investigation of those.
Something I realized while following up a newsgroup post. If you
knew an item's bless/curse state and dipped it into water while
blind, the bknown flag stayed set and you learned the item's new
bless/curse state without seeing any "glows blue/black/&c" feedback.
Clear the flag unless you know that the potion being dipped into is
water (or is clear if not water has not been discovered) and also
know the water potion's own bless/curse state.
Music wasn't using You_hear() so needs to handle Deaf itself. Have
it give alternate messages for sounds being emitted from instruments.
This doesn't implement the suggestion that a Deaf hero shouldn't be
able to produce the same music as a non-deaf one.
More symbols: I left out a word on the continutation line for S_stone
and S_tool has been forcing narrow space where ordinary <comma><space>
was intended.
Guidebook.tex not tested. The \, in the continuation of S_stone is
a narrow space in LaTeX. It should be \hspace{ width of '(' } but
I don't remember how to measure something in LaTeX or TeX.
Guidebook.mn is getting two small changes: I forgot about the
guideline that each sentence be on its own line. Also, this adds the
fix for wide lines in the dungeoneers list although the reordering
accompanying a recent change might have made that moot (unless some
future reordering puts wide names on the same line again, assuming
that was the issue).
The table listing symset entries was ok for ps/pdf output but for
plain text output it was wrapping to a second line for S_xan,
S_pet_override, and S_player_override and also going past the right
margin for some others. I've shortened the text for those three
and narrowed the first column to give more room for the third column,
bringing all the lines within their margin.
The entry for S_stone was rather surprising: "dark part of a room".
It now says "solid rock or unexplored terrain or dark part of a room"
and needed to span two lines.
The first column has been labeled "Default" but that was why that
column was wider than necessary. It now has a label of two spaces
and is left justified instead of being centered. It is also now
forcing constant-width Roman as the font and every character in that
column should be the same size so one reason for centering is removed.
The title used to be centered but always looked a bit off due to the
fact that the three columns have differing widths and/or because of
the over-wide lines changing the location of "center". It is now
left justified and looks a little bit like it's labeling the first
column. Perhaps it needs a blank line separating it from the rest.
Guidebook.tex is lagging again.
Creation of guardian angel bypasses tamedog() and marks it tame
directly but it wasn't updating the map after changing the monster.
So if 'hilite_pet' was On when entering the Astral Plane level, the
angel appeared to be ordinary monster rather than a tame one until
it moved or the screen was redrawn. Also, the message about it
appearing was issued before marking it tame, so a tiny bit of code
reordering has been done to get the sequence correct.
This sample comment attending the sample SYMBOLS statement fit ok in
the pdf output but wrapped to another line in the plain text output,
so shorten it.
S_xan, S_pet_override, and S_player_override still wrap, but by a bit
less than before. Their width causes the line of dashes at the top
of the table to wrap too.
Guidebook.tex is still lagging behind.
I think it was issued by tbl but it wasn't about any of the tables.
warning: numeric expression expected (got 'R')
was complaining about
.lp SYMBOLS, ROGUESYMBOLS
Exclosing the paragraph label within quotes to make it one argument
to the lp macro or command would have fixed this, but I've split
them into two paragraphs. And reordered several of the paragraphs
which were alphabetized just enough to make the out of order ones
seem like mistakes.
Guidebook.tex needs to catch up.