Commit Graph

7167 Commits

Author SHA1 Message Date
PatR
4cd983cb6f Guidebook.mn single quotes
Replace `C' and 'C' with \(oqC\(cq (open and close single quote).
For plain text output, the new form generates the first form.  Most
single quotes were using that, but there was quite a bit of C-style
char quoting that was somewhat inconsisent.

There are several text changes too, mostly small.  The few I can
remember are
  replacing several ``#twoweapon'' with `X';
  pets:  change 'cat' to 'kitten' and mention that horses are
    vegetartian where it claims that pets usually feed themselves;
  NETHACKOPTIONS:  add `bash' to the shells mentioned,
    describe `NETHACKOPTIONS=@filename' better,
    shorten the example (it's still too long for Guidebook.txt);
  Configuring Status Hilites:  expand the `behavior' descriptions
    to mention the value limits for percentage and absolute, and
    include post-3.6.1 '<=' and '>=' for them,
    add omitted fields `hunger' and `title' to text match.

I also changed a bunch of examples in the option configuation section
from bold font to constant-width Roman which more closely resembles
the \tt font in TeX.  Probably a whole bunch of other bold items
ought to follow suit.

Issues:
  title for section 9.3 (NETHACKOPTIONS) is too close to the sample
    config file at the end of section 9.2;
  as mentioned above, the sample ``setenv NETHACKOPTIONS foo'' is
    much too long for Guidebook.txt, and ``NETHACKOPTIONS=foo'' is
    slightly too long; they're ok in Guidebook.ps (assuming default
    page size);
  does `WIZKIT=~/wizkit.txt' actually work?  That's the example shown.
2018-10-17 05:22:36 -07:00
PatR
ebc89522ae a few Guidebook tweaks
I started out updating Guidebook.mn to use \(oq and \(cq for single
quotes but ended up including some new text.  I've separated that
part out (there are a few instances of altered quoting in the midst
of it--the separation wasn't 100%) to commit separately.

Add verbiage to "choosing race" and several commands:  f, s, S, t,
w, and ^X.

Change `E-' and `w-' to use minus sign instead of hyphen.  The TeX
edition uses \tt font for those which has the same effect of making
those dashes be more prominent.

Fix typo/thinko in `IX':  Guidebook.mn and Guidebook.txt said that
displayed inventory items whose bless/curse state is "known".
Guidebook.tex had it right, "unknown".
2018-10-16 15:18:09 -07:00
Pasi Kallinen
4db9a06c6c X11: Find scrollbars in same window
Adding scroll() translations to a window with no scrollbars
scrolled the main window message area.
2018-10-16 20:44:56 +03:00
Pasi Kallinen
24674e10e5 X11: Add geometry handler on perm_invent win only 2018-10-16 19:21:46 +03:00
Pasi Kallinen
8c17825afd X11: Remember perm_invent window geometry
Instead of remembering the geometry at window closing time,
remember it immediately when it changes.
2018-10-16 19:08:49 +03:00
Pasi Kallinen
b3c8acfeeb X11: Allow toggling mouse_support off
Prevents accidental mouse clicks on the map.
2018-10-16 18:09:54 +03:00
Pasi Kallinen
ddf6d13fd1 X11: Don't reuse perm_invent window for picking an object
The core wants to reuse the permanent inventory window for choosing
an object from inventory, but the perm_invent window could be
hard to focus - it could even be on another display!

Instead, create a temporary new window from which the user can
pick an inventory item.
2018-10-16 17:39:45 +03:00
PatR
e0f5cfe0b3 fix #H7453 - 'bonesknown' for dead hero
Dead hero's map coordinates are set to <0,0> part way through bones
creation, then were being used to record grave location for overview
feedback with "final resting place for <dead hero>" if/when another
character got those bones and found the grave (actually, spotted the
location where first hero died regardless of whether a grave gets
placed there).  Record dead hero's pre-<0,0> coordinates as intended.

Not previously noticed because in wizard mode the final resting place
becomes part of overview info as soon as bones are loaded rather than
waiting for the death location to be reached.
2018-10-15 18:26:49 -07:00
Pasi Kallinen
011dfee945 X11: Allocate menu translation tables only once
Also force free the menu entry widgets when non-perm-invent
window is popped down.
2018-10-15 18:38:41 +03:00
PatR
51256055fb refresh Guidebook.txt again
Features the 'boxed' screenshot.  Unfortunately, pushing that to the
next page changes all the following pages, so diff is big.
2018-10-14 17:49:27 -07:00
PatR
ac2514c149 Guidebook.mn screenshot
Putting a box around the simulated screenshot has a side-effect of
forcing it to the next page if there isn't room on the current page.
And it looks at least as good as the old top and bottom horizontal
lines, if not better.  This also eliminates the blank left-most
column (relative to those lines) which isn't part of the screenshot.

There are issues:
1) for Guidebook.ps, the "Figure 1" label underneath seems to be
   too close to the box; I didn't try to force a blank line in front
   of it because that increases the risk of pushing it to the next
   page if the figure lands at the bottom;
2) for Guidebook.txt, the "Figure 1" label actually overwrites the
   bottom line of the box, and the embedded space allows the line
   to show through:  "---Figure-1---"; I tried using "\ Figure\ 1\ "
   to see if that might hide the issue by making it seem that the
   label in intended to be on that line, but it didn't help--
   unbreakable-space evidently does not imply always-visible-space;
3) the box is one column wider than the rest of the document (the
   previous horizontal lines were two or three columns wider, so
   this is actually a tiny imrovement); squeezing out some whitespace
   to make the status lines narrower didn't help--or at least not
   enough; squeezing some spaces was needed to match STATUS_HILITES-
   era status formatting anyway.
4] if there was a footnote (we have some for trademarks) on the same
   page as the screenshot, either the footnote or the table would
   probably become confused, perhaps both.  I think we just pretend
   that that will never come up....
5} I've made no attempt to alter Guidebook.tex to try to match.

I'm throwing in the towel.  Fixing this up is way beyond my limited
'roff/tbl capability.  (There's probably a much more straightforward
way to achieve what we want.)
2018-10-14 17:46:48 -07:00
PatR
79fe07d86f bring Guidebook.txt up to date
I may not get around to doing anything with 'C' vs `C' vs \(oqC\(cq
for a while.  Bring Guidebook.txt up to date now rather than waiting
so that the repository's copy reflects the #H7444 fix.

This has ended up with substantial spurious differences due to it
placing padding in different spots during line justification.  I
hope that's due to different groff version using a slightly different
algorithm rather than something like phase of the moon.  :-]
There also differences caused by "..." taking less space than ``...''.
2018-10-14 15:09:40 -07:00
PatR
2e21e6b10a fix #H7444 - bad line split in Guidebook
Reported for Windows beta3 but turns out to be present in 3.6.1
distribution.
| #wait
|      Rest one move while doing nothing. Default key is '.', and '
|      ' if rest_on_space is on.
where the line split occurs in the middle of "' '".  We should
switch from the ascii single quote to the 'nroff open and close
single quote escapes but I haven't gotten around to that.
Preceding the space with backslash prevents a line break there.
2018-10-14 14:30:02 -07:00
PatR
8612cc0f88 Guidebook.mn update
Replace ``foo'' with \(lqfoo\(rq (many instances) so that the
plain text Guidebook will use ".  Also a few `bar' with \(lqbar\(rq
(mostly `#enhance' and `#twoweapon') to be consistent with other
command names that all use double quotes.  And replace a few strings
in actual double quotes with corresponding \(lq or \(rq.

Replace command descriptions using ^X with \(haX to get the larger
circumflex character (aka 'hat') instead of the smaller circumflex
punctuation.  (Not noticeable with plain text output.)

Changed one DOS and a few MSDOS to MS-DOS to match the spelling in
the trademark line at the end.

Start each sentence on its own line for the paragraphs which were
being subjected to the above changes.

Also a much smaller subset for Guidebook.tex (not tested...).

Does not address the "wrapped to next line in middle of ' '" issue.
2018-10-14 12:58:59 -07:00
PatR
239c3cef55 fix github pull request #144 - uswapwep vs shield
Fixes #144

While giving a new character his/her starting equipment, don't clear
alternate weapon when putting on a shield since that weapon should
still be available to swap with primary.  Affected knight's lance
and valkyrie's dagger.

Also, guard against wearing an initial shield if already wielding a
two-handed weapon, or wielding such a weapon if already wearing a
shield.  Both situations are hypothetical with current starting gear.
2018-10-14 02:47:09 -07:00
PatR
f22d32316d fix #H7446 and #H7448 - Guidebook bits
\#H7448 - option 'dark_room' showed incorrect default value.

\#H7446 - persistence of objects section was missing a word in
its second paragraph.

Also, fix up some clumsy wording in the first paragraph of that
same section.
2018-10-14 02:02:41 -07:00
PatR
e4db2b4721 Elbereth tweaks
Don't "feel like a hypocrite" when on Elberth and attacking a monster
which isn't scared by Elbereth (exception:  peaceful creatures aren't
scared but attacking them in such situation is hypocritical anyway).
This means that players can use Elbereth to scare away some creatures
while continuing to fight others.  Elbereth won't be automatically
erased, but weapon attacks will scuff the engraving; wand zaps don't.

Reduce the -5 alignment penalty when alignment is 5 or less.  Reduced
amount is -(1..5), so -3 average.
2018-10-13 18:14:34 -07:00
Pasi Kallinen
b2d2521289 X11: Handle X errors via panic
This leaves a usable backtrace for debugging.
2018-10-13 15:07:27 +03:00
PatR
df1d413118 X11 build fix
Replace a C99ism.
2018-10-12 18:10:06 -07:00
nhmall
e25c7be719 keyhelp missed during Windows build steps
BUG REPORT:

    comments:
    1. I start a new character.
    2. The first command I type is '&'
    3. I type "?" and "<enter key>" at the prompt.
    4. Cannot open "keyhelp" data file!--More--
       ?    give a help message.

1559
2018-10-12 20:57:26 -04:00
Pasi Kallinen
d19a4ac590 Fix segfault in X11 perm_invent if it was partially obscured 2018-10-13 00:37:15 +03:00
Pasi Kallinen
9f2f232d99 X11: Allow bold attribute for menucolors 2018-10-12 20:46:19 +03:00
Pasi Kallinen
62234b871f X11: Remember perm_invent window geometry 2018-10-11 20:18:07 +03:00
Pasi Kallinen
c09260d8f7 X11: Handle paged menu control keys
X11 doesn't do menu paging, so handle the select page, invert page,
and unselect page like selecting, inverting or unselecting all.
2018-10-11 18:07:56 +03:00
Pasi Kallinen
bf81a981e3 X11: Mouse wheel scrolling in menus 2018-10-11 17:59:20 +03:00
PatR
7348d93763 X11 menus
Fix some compiler warnings and some formatting.

Builds cleanly but is otherwise untested.
2018-10-10 17:04:11 -07:00
Pasi Kallinen
e48c61c06f X11: Menucolors
Replace the XawList with our own lists of labels and command widgets
to allow for menucolors. Supports only inverse line attribute for now.

Allow key translations to work with menus on Linux.
2018-10-10 21:50:23 +03:00
Patric Mueller
ae61fe6f27 Fix Qt compilation 2018-10-10 03:08:15 +02:00
nhmall
c6a5ec1ab6 ensure tmp_at() structures are initialized for all code paths when swallowed 2018-10-04 22:02:28 -04:00
nhmall
8ce1f88f53 Revert "ensure tmp_at() structures are initialized for all code paths when swallowed"
This reverts commit 39074d29fc.

Bad commit of do_throw
2018-10-04 22:00:51 -04:00
nhmall
67c80b2e4b Revert "fix up a bad commit"
This reverts commit 2eb8436db2.
2018-10-04 22:00:08 -04:00
nhmall
2eb8436db2 fix up a bad commit 2018-10-04 21:55:01 -04:00
nhmall
39074d29fc ensure tmp_at() structures are initialized for all code paths when swallowed 2018-10-04 21:49:16 -04:00
PatR
14bef9a02d formatting cleanup src/*.c
Remove trailing spaces, and remove tabs from the files that had
trailing spaces.

Also, rndorcname() was using a random value to terminate a loop
and was recalculating a new one each iteration.
2018-10-02 16:53:22 -07:00
PatR
1110786ec2 change default for 'autodescribe' to 'on'
This was discussed two years ago then nothing happened.  Make
autodescribe for feedback when moving the cursor to pick something
default to on instead of off.
2018-10-01 15:08:33 -07:00
PatR
053880c149 untrap downwards while over trap
Force trap to activate during failed untrap attempt if done while
already at the trap's location, to match the recent change in
behavior when failed attempt occurs while adjacent to the trap.

Most noticeable while flying over bear traps, but affects all
failed untrap attempts.
2018-09-30 16:37:32 -07:00
nhmall
d9ecc42566 a couple of steed Flying messages 2018-09-30 10:01:43 -04:00
nhmall
85aef136d5 comment typo in music.c 2018-09-30 08:45:49 -04:00
PatR
317f0b56fa tile.c formatting
Modify win/share/tilemap.c so that generated source file src/tile.c
uses similar formatting to the other sources.  Mainly, avoid tabs and
use 4 columns indentation instead of 8 columns in the short routine
near the end.

tilemap.c still treats STATUES_LOOK_LIKE_MONSTERS as conditional.
The main sources made that unconditional prior to release of 3.6.0.
2018-09-30 02:11:32 -07:00
PatR
3e19858edd fix #H6925 - being trapped vs Levitation/Flying
Make being trapped in/on/over floor block Levitation and Flying, the
way that being inside solid rock already does, and the way levitating
blocks flight.

Blocked levitation still provides enhanced carrying capacity since
magic is attempting to make the hero's body be bouyant.  I think that
that is appropriate but am not completely convinced.

One thing that almost certainly needs fixing is digging a hole when
trapped in the floor or tethered to a buried iron ball, where the
first part of digactualhole() releases the hero from being trapped.
If being released re-enables blocked levitation, the further stages
of digging might not make sense in some circumstances.

I recently realized that being held by a grabbing monster is similar
to being trapped so should also interfere with levitation and flying.
Nothing here attempts to address that.

Save files change, but in a compatible fashion unless trapped at the
time of saving.  If someone saves while trapped prior to this patch,
then applies it and restores, the game will behave as if the patch
wasn't in place--until escape from trap is achieved.  (Not verified.)
2018-09-30 01:06:59 -07:00
nhmall
00dfed5b3a move assignment outside inner loop 2018-09-29 23:38:20 -04:00
nhmall
ef199f3763 one more update for the right of the status line
This tracks the last character written on each row and clears
the previous content from the end independently of which field
is actually involved.
2018-09-29 23:21:11 -04:00
nhmall
d1c5649890 revisit display artifact appearing to the right of status line
The prior fix for this was a bit flawed. It was only considering
the length of the last field, but what it really needed to do was
consider the placement of the last character of the last field
on the row relative to the placement of the last character of
the last field on the row previously.

If the new placement of that last character of the last field
is left of the previous placement, some clearing must be done.
2018-09-29 22:28:10 -04:00
nhmall
394c72d366 display cleanup only targets the right-most field where it's needed 2018-09-28 12:55:30 -04:00
nhmall
bdc9a6b98e follow-up bit 2018-09-28 02:28:54 -04:00
nhmall
b14d495ce4 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-09-28 02:09:30 -04:00
nhmall
5639539568 tty: fix leftover display artifact when last field on the row got smaller 2018-09-28 02:09:07 -04:00
PatR
21db5a3ae6 alternate bear trap fix
Fix the situation of Flying hero failing to untrap a bear trap that
was resulting in the trap becoming hidden.  Previous fix prevented
hero from moving onto the trap's location so that the reason for
hiding it didn't occur.  This moves the hero and forces the trap,
so it will become unhidden again before there's any chance to notice
that it had been hidden.

Status 'Flying' conflicts with being trapped at floor level, but that
is a separate, known issue.  I'll have to resurrect my unfinished fix
for that sooner rather than later.
2018-09-27 18:42:12 -07:00
Patric Mueller
f87931a7bf fix typo of the Junethack tournament 2018-09-27 22:14:28 +02:00
PatR
dc3f497d56 more extended command help
For the searching capability offered by '# ?', use ':' instead of 's'
to activate it.  Otherwise, if the player typed ':', menu processing
would handle that and would search the few menu entries (for selectors
'a', 's'--now ':', and maybe 'z') when we're interested in searching
the data displayed via many separator lines.

I left 's' as the selector for "show all, clear search" once a search
has been performed, but perhaps that ought to be switched to ':' too.
2018-09-27 03:52:23 -07:00