A few symbol-related modifications:
- fulfill a request from a blind player to allow them to
specify a unique/recognizable character for all pets and/or
the player in the config file for use when using a screen
reader (S_player_override, S_pet_override). Requires sysconf
setting ACCESSIBILITY to be set to have an effect, although
they can still be specified in the config file.
- Config file SYMBOLS entries were not working properly on
the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
specified in the config file independently.
- When values are moved into showsyms[], the overriding SYMBOLS
or ROGUESYMBOLS entry from the config file is used if there is
one; if there is no overriding value for a particular symbol,
the loaded symset value is used; if there is no symset entry
loaded for the symbol then a default symbol is used.
travis updates for Windows deploy
Change zip file name from NetHack.zip
to
NetHack-x86-beta$TRAVIS_TAG.zip
where $TRAVIS_TAG represents the tag info.
Also, log the commands from the sh script in win/win32/vs2017 to the build log.
Moved the travis visual studio build bash script to live outside of
the travis YML file. Updated the script to use powershell to generate
ZIP file form the binary results.
Deploy Windows build ZIP file to github releases if build has commit
has been tagged. Build will be marked pre-release.
Make paranoid_query() (yn question requiring explicit "yes" answer)
protect itself from overly long prompt strings. I'm not aware of
any specific overflowing queries so I temporary reduced QBUFSZ within
paranoid_query() in order to test.
For EDIT_GETLIN, don't use previous response as default if we loop
after neither "yes" nor "no" was given for paranoid confirm.
Fixes#238
For the three fields in the 'scores' option's argument: top, around,
and own, if any was separated from preceding one by space(s) rather
than slash and lacked a count prefix, the argument parsing skipped
over it. So "10t/3a/o" and "10t 3a 1o" worked but "10t 3a o" ignored
the 'o'. The issue report was about 'own' but there's nothing special
about 'own' itself; just that it doesn't warrant a count prefix and is
usually last (in other words, normally preceded by one or both of the
other two) so more likely to trip over this.
[I thought there was another report about 'scores' misbehaving (from
quite a while ago) but couldn't find one. If it exists, it might have
been about the same thing.]
Mimic-as-slime_mold needs to keep track of the fruit index the same
way that mimic-as-corpse keeps track of corpse's monster type. The
mimic description was changing (for '/' and ';' feedback) whenever
the player assiged a new fruit name.
That wasn't noticeable when applying a stethoscope because
mimic-as-slime_mold always yielded "that fruit is really a mimic".
Change it to report the fruit's type instead of generic "fruit".
For 'O's menu, make the current symbol set be pre-selected so that
the set in use is clearly marked while contemplating changing it.
Using Return or Enter will pick it again; Escape is now needed to
deliberately not make any selection.
Also, change several symbol set initializations to use the new method
of deciding whether the default symbols are still in place.
Fix a couple of bugs I stumbled across while testing something else.
The sell prompt for a container dropped in a shop had phrasing issues.
This fixes a couple but there are more. The message composition
assumes that contents fall into two categories: those already owned
by the shop and those the shopkeeper is offering to buy from the hero.
But there is a third: stuff the shopkeeper doesn't care about so
won't buy. The count_contents() routine can supply total contents or
shop-owned contents. Subtracting one from the other yields combined
hero-owned without any way to separate out shk-cares and don't-care.
Dying in a shop while carrying partly eaten food would place that food
on the floor without marking it no_charge. But marking it that way
wouldn't have helped because as bones data gets saved, every object on
the level has its no_charge flag cleared. So 'no_charge' needs to be
explicitly set for partly eaten food in tended shops as a bones level
gets loaded.
Most of the shk.c diff is reformatting, but it does change the
get_pricing_units() routine to lie that the quantity is zero for
partly eaten food so that when multiplying with price it won't matter
whether the price has been forced to zero or been left non-zero.
One of the comments for pull request #234 mentions that the colors
for sleep and poison are backwards. Yellow dragons had green breath.
Green dragons would have had yellow breath if they used the normal
zap symbols, but they use the poison cloud one which is green so
they had green breath. I rarely have color enabled and had never
noticed. (At the moment I can't find where the switch from zap to
cloud is being done.)
Pull request #234 is based on #231, about control of the shield
effect animation when resisting. But it changes struct flags so
would break 3.6.x save file compatibility.
Fixes#235
For initial options under curses, specifying 'DECgraphics' as a
boolean rather than as 'symset:DECgraphics' wasn't overriding the
new default 'symset:curses'. Since previously DECgraphics was
rejected for curses, it's possible that no one noticed.
Primary and rogue symbols were being set to default if primary hadn't
been given a value, possibly clobbering rogue symbols if those had
been given a value. Initialize them independenly.
Return early from curses_convert_glyph() if the value doesn't have
the 8th bit set since it now deals exclusively with DECgraphics
handling. Force a sane value for returning early on rogue level.
Change the way symbol sets are loaded to make them have the same order
as they appear in the symbols file rather than being reversed.
Revise dat/symbols so that the new ordering yields a result similar
to the old ordering, more or less. I've added a few set descriptions.
The only substantive change is marking DECgraphics as primary-only
(not available on rogue level) and adding new set DECgraphics_2 which
is commented out near the end.
Define symbol handling H_MAC since one of the sets specifies
'handling: MAC'. All H_MAC is used for now is to avoid showing
MACgraphics as a symset when compiled without MAC_GRAPHICS_ENV (which
was used for pre-OSX Mac by the old code in sys/mac/), so it will be
hidden for everyone.
I left handling H_CURS even though curses doesn't implement anything
for it. It could do something when rendering the map or assign a
function to 'cursesgraphics_mode_callback' for special init or both
but hasn't needed to. Since curses is now supporting DECgraphics,
define 'decgraphics_mode_callback' for it. No value is being
assigned so that doesn't do anything; curses seems to be setting up
the primary character set as text and secondary one as line-drawing
without the need for that hook.
With the added set descriptions, 'O's symset menu looked horrible for
curses due to the way curses decides to set the width of menus and
the resulting line wrapping which took place because of a too-narrow
menu. I've added a chunk of code to the options handling code which
shouldn't really be there but makes the menu much easier to read.
Lastly, do some formatting cleanup in files.c.
Move a declaration that became mid-block when a preceding 'if () {'
got removed to top of block suppress warning about C99 feature.
Add new entry for the curses symset change to fixes36.3.
This time I'm putting things in as-is before making a few tweaks.
The pull request was three or four separate changes. I used the
patch instead so they've been collected into one commit.
Highlighting for monsters shown due to extended monster detection and
for lava shown in black and white didn't work because that keys off
of 'iflags.use_inverse' (actually a macro for 'iflags.wc_inverse') and
curses wasn't enabling that window-capability option. To be fair, it
was probably unconditional at the time the curses interface was first
developed. It checked for whether a monster was supposed to be drawn
with inverse highlighting but wouldn't draw it that way because the
flag was always false. Inverse b&w lava is relatively new and curses
hadn't been taught about it.
Various other things such as pets (if hilite_pet is on) and object
piles (if hilite_pile is on) get highlighted with inverse video when
use_color is off, regardless of whether use_inverse is on or off.
That's probably a bug.
Fixes#230
Incorporate github pull request #230, support for DECgraphics-style
line drawing in the curses interface. I've rewritten the
curses_convert_glyph() part so that it doesn't require C99 and
doesn't reinitialize its pair of arrays for every character written
to the map. The DECgraphics conversion is now a straight char for
char one, DEC line drawing code to ACS, without regard to what map
symbol is intended or what 'cursesgraphics' uses for that symbol.
In launch_obj, the code first got the trap, then called ohitmon
(which can delete the trap by doing mondied -> fill_pit ->
flooreffects -> deltrap), then after that used the trap variable.
Trigger a land mine while being polymorphed into a monster that
automatically hides (eg. scorpion). Have the statue on the land mine
shatter and all items on that square scatter away. Avoid falling
into the pit left by the land mine.
For the DECgraphics symbol set, down ladder is the greater-than-or-
equal-to character as intended and up ladder is less-than-or-equal-to,
but comments in dat/symbols had their descriptions transposed.
If you chat with a peaceful gnome while hallucinating, you might
get a silly message from the TV show South Park.
To make it work for non-gnome characters, I changed the speech of
monsters who normally just grunt (gnomes, orcs, ogres, a couple
of other groups) to full humanoid when the hero is hallucinating.
(It already does that for orcs if the hero--hallucinating or not--
is an orc and for gnomes when the hero is a gnome.)