Commit Graph

15892 Commits

Author SHA1 Message Date
nhmall
d00707984b more follow-up from -Wno-missing-field-initializers avoidance 2023-11-20 19:09:02 -05:00
PatR
eb89388b35 pull request #1135 - tweak encumbrance messages
Pull request from AndrioCelos:  for feedback during pickup, add a
separate message from stressed instead of sharing the burdened one
and issue messages at higher encumbrance levels.

This 'tweak' will probably need more tweaking to reduce verbosity
when picking up multiple items in one operation.

Closes #1135
2023-11-20 13:21:37 -08:00
Andrio Celos
e10a648ca9 Code style fix 2023-11-20 13:21:37 -08:00
Andrio Celos
b4aee17578 Use encumbrance prefix in pickup_object when above burdened also 2023-11-20 13:21:36 -08:00
Andrio Celos
f2f4fa06dd Separate messages for becoming burdened and stressed 2023-11-20 13:21:36 -08:00
nhmall
4c9d5a752a more follow-up 2023-11-20 16:19:54 -05:00
nhmall
d5b0c9a5a2 some follow-up for -Wno-missing-field-initializers avoidance
I wasn't getting a warning on this line myself, I just had it reported.
Because of that, I can't be certain this fixes it either.
2023-11-20 16:12:28 -05:00
PatR
d49e923986 engraving #whatis bit
The symbol/tile renaming for engravings made this unnecessary.
2023-11-20 12:26:51 -08:00
nhmall
033c6981d8 some minor files.c cleanup 2023-11-20 14:59:03 -05:00
nhmall
2f167a4672 allow clean build without using -Wno-missing-field-initializers 2023-11-20 14:25:09 -05:00
nhmall
983000618c another general-pre.370 follow-up 2023-11-20 11:53:58 -05:00
nhw_cron
c6e2d0f8ec This is cron-daily v1-May-8-2022. 000files updated: Files 2023-11-20 11:40:27 -05:00
nhmall
90c08ab6d3 follow-up to general-pre.370 change 2023-11-20 11:07:32 -05:00
nhmall
3fc24d937b inform the builder if their Makefiles need updating 2023-11-20 10:48:31 -05:00
PatR
e723a4aafa rename engraving symbols and tiles
"engraved part of a room" and "engraved part of a corridor" sound
silly.  Change to "engraving in a room" and "engraving in a corridor".
Still displayed to player as just "engraving".

An orhpaned wintype.h tweak got dragged in.  Renumbers to_core_flags.
2023-11-20 00:47:12 -08:00
PatR
490b60da4d whatis fix for boulders
In the past couple of days the code for '/' and ';' to examine
objects was changed to handle ROCK_CLASS differently (as part of
revising looking at map spots showing the engraving symbol).  It
could potentially set up a static buffer in the object classes loop
and then overwrite that when processing another class.  I couldn't
trigger any feedback anomalies, even when changing bouldersym to
various values including class characters both before and after '`',
but this redoes the suspect code to make it more robust.

Also, refine the test for whether a screen symbol matches an object
symbol.
2023-11-20 00:29:16 -08:00
nhmall
5c8b36e95a Revert "don't build in support for obsolete makedefs options"
This reverts commit 13f49bdd92.
2023-11-19 17:36:25 -05:00
nhmall
a42d3dadce Revert "remove pasted comment"
This reverts commit c33c49295d.
2023-11-19 17:36:00 -05:00
nhmall
2cbbfbe648 Revert "comment typo"
This reverts commit bca8720c6e.
2023-11-19 17:35:30 -05:00
nhmall
bca8720c6e comment typo 2023-11-19 10:56:26 -05:00
nhmall
c33c49295d remove pasted comment 2023-11-19 10:10:27 -05:00
nhmall
13f49bdd92 don't build in support for obsolete makedefs options
unless OLD_MAKEDEFS_OPTIONS is defined during the compile of makedefs.c
2023-11-19 10:05:01 -05:00
PatR
d3e80bf9bf expand Plane of Fire to fill entire map
The other three elemental planes go all the way to the map edges.
Fire was 76x20 rather than full 79x21.  This adds new two columns on
the left (necessitating some coordinate adjustments) and one on the
right plus one new row on the bottom.  Not particularly interesting,
just padding.
2023-11-19 04:54:20 -08:00
PatR
f23176155c tty: fix 'statuslines' off by 1 error
With CLIPPING disabled you should need a terminal or window with at
least 25 lines to change the 'statuslines' option from 2 to 3, but
it was being allowed on tty when there were only 24 lines available.

I think the other interfaces always have clipping capability enabled
so aren't affected.

Not many level maps extend to the bottom row (line 22 for a 1-based
count) so it wasn't likely to be noticed during play.  That points
that maps which don't use all rows and/or all columns could get by
without clipping by adjusting their position.  However, implementing
adaptive clipping is not something that I'm going to try to tackle.
2023-11-19 01:11:43 -08:00
PatR
3021423a5f github issue #1145 - ^C-induced panic on tty
Issue reported by entrez:  on tty, ^C while a menu was open followed
by 'yes' to "Really quit?" would lead to a bad window panic.

Brought on by screen erasure changes included with recent SIGWINCH
(window resize signal) changes.

Closes #1145
2023-11-18 17:45:43 -08:00
Alex Smith
86c29f5b47 Allow identifying stackable items by comparison to identical items
NetHack has historically had problems (both in terms of interface
and in terms of gameplay exploits) caused by unidentified items
not stacking with identified items.  The 3.7 change to cause items
picked up by monsters to become unidentified has exacerbated this,
e.g. there's an undesirable strategy in which players give
ammunition to hostile monsters in order to unidentify it, allowing
it to stack with other unidentified ammunition so that the whole
stack can be enchanted with a single scroll.

This commit makes it possible to stack items with different
identification statuses (unles Blind), in effect causing the
unidentified items to be identified by comparing them to the
identified items (this is consistent with the mechanic via which
two stacks of unidentified items can be determined to be the same
as each other).  The hope is that this will prevent any gain from
exploits involving intentionally unidentifying (or intentionally
failing to identify) items, that it will prevent interface clutter
caused by (e.g.) a Ranger's main projectiles becoming partially
unidentified as a nymph picks them up and subsequently failing to
stack, and that it will reduce the incentive to backtrack to an
altar to merge, e.g., a stack of formally-known-uncursed and a
stack of informally-known-uncursed food rations to stack.
2023-11-19 01:21:53 +00:00
nhmall
11ad859c4c nothing actually depends on options anymore 2023-11-18 19:21:54 -05:00
PatR
ed102b3b81 comment typo 2023-11-18 11:57:30 -08:00
PatR
1fc56e4be8 new bugs - implement 'whatis' of engravings
'/ e' (or '/ `') lists nearby engravings (including headstones) that
  the hero has read or felt (even if currently covered up) or can see
  on the map;
'/ E' (or '/ |') lists all such on the level.

If the hero remembers an engraving and then monsters scuff it out of
existence, it will magically disappear from the list of remembered
engravings when deleted.  I don't think that's worth bothering with.

[During testing, my pet seemed extremely reluctant to step on a
corridor engraving.  That could have been coincidence but it seemed
to keep happening until I moved so close that it had no choice.  I
wasn't carrying tripe.]
2023-11-18 00:35:30 -08:00
PatR
389f03e90e farlook of engravings
Report headstone engraving when using farlook to examine a grave:
| a grave (grave whose headstone reads: "foo")
or
| a grave (grave whose headstone you haven't read)

Make the farlook of ordinary engravings operate more like farlook of
other things:
| a boulder or a statue or an engraving (engraving with text: "bar")
rather than
| a boulder or a statue or an engraving with text: "bar"
The "or a statue" phrase will now be suppressed because statues aren't
shown as backtick anymore, so the parenthesized form isn't quite as
long as it would otherwise have been.  If OPTIONS=boulder:symbol is in
use, the "a boulder" part will be gone too.
| an engraving (engraving with text: "bar")
or
| an engraving (engraving that you haven't read)

Make quicklook include engraving text.  It's quick because it doesn't
ask the player to pick additional spots or whether to look up relevant
data.base quote, not because it skimps on useful information.

Autodescribe still does not include engraving text.
2023-11-17 17:36:04 -08:00
nhmall
a784a06cf6 remove a band from an earlier test 2023-11-17 14:22:40 -05:00
nhmall
a92c1b7163 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2023-11-17 14:21:42 -05:00
nhmall
d7ed474fa7 2nd follow-up to alternative fix for menu search (':') 2023-11-17 14:13:58 -05:00
nhmall
4803022e90 Revert "follow-up for alternative fix for menu search (':')"
This reverts commit 569955ccac.
2023-11-17 13:54:41 -05:00
nhmall
b3024c3c6c Revert "follow-up for alternative fix for menu search (':')"
This reverts commit 569955ccac.
2023-11-17 13:46:13 -05:00
nhmall
569955ccac follow-up for alternative fix for menu search (':') 2023-11-17 13:40:38 -05:00
nhmall
0a13d759a3 more bot() tinkering 2023-11-17 09:47:39 -05:00
nhmall
a46c71f4c5 replace useful descriptive comment in tty getline 2023-11-17 09:04:27 -05:00
nhmall
7903849939 follow-up: program_state variables are int 2023-11-17 08:42:43 -05:00
nhmall
8d1001842d alternative fix for menu search (':')
This avoids clearing core context variables within a window port.
2023-11-17 08:37:54 -05:00
PatR
a49c872f47 another 'm #overview' fix
Once in the endgame, suppress non-endgame levels from the 'm #overview'
annotation menu like is already done for normal #overview.
2023-11-17 00:43:06 -08:00
PatR
387cef9899 'm #overview' enhancement
When using the 'm' prefix with #overview to get a menu of visited
levels and then picking one to annotate, replace the generic prompt
"what do you want to call this dungeon level?" with more specific
location information.  Location details are visible while within the
menu but as soon as you choose something that goes away.
2023-11-17 00:36:43 -08:00
PatR
3accaf9c53 PR #1142 - show level annotation when restoring
Pull request from entrez:  when issuing the "welcome back" message
when restoring, print the current level's player-suppliedannotation
if there is one.  Doesn't show automatically generated annotations
like "Oralce of Delphi" or "a sink" or "stairs to the Gnomish Mines".

Closes #1142
2023-11-16 23:16:54 -08:00
Michael Meyer
f5a22ff5f8 Print current level annotation when restoring
Sometimes I annotate a level with a note like "watch out, chameleon
below", which is useful to remind myself of some danger or thing to
remember when returning to the level -- but if saving and restoring on
the level itself there's no reminder of that annotation.  If you restore
on a level with an annotation, print it as part of the "welcome back"
message.
2023-11-16 23:15:04 -08:00
PatR
73fed3d5d8 tty: menu search (':') fix
'm O' is a prime candidate for using ':' to select a menu item since
you can use that to avoid scrolling through many pages, but typing ':'
would immediately overwrite two or three lines of the menu with a
status refresh.  curses doesn't suffer from this problem.  X11 and Qt
show menus in separate windows do don't either.  Not sure about WinGUI.

I think that this may have been reported in the past, but if so I don't
recall by whom, or why it wasn't addressed.
2023-11-16 23:11:54 -08:00
nhmall
a82a897da3 avoid ctrl_nhwindow-related impossible
Remove the impossible(), so that new functionality can be added
incrementally without requiring every window-port to be visited up front.
2023-11-16 21:00:59 -05:00
nhmall
ce587ac3b0 menu heading tweaking Take 2
Apparently, color option is meant to apply only to the map, so doesn't
need to appear here, and the reference on the previous commit was wrong.

    <curses guicolor>
    on: map, menu items, menu headings, menu prompt/title can all feature color, as can
    menu borders, menu-selector letters.
    off: map, menu headings, menu prompt and menu items (menucolors on) can still feature color,
    but all other non-map features such as menu borders, menu-selector
    letters will not have color.

    <menucolors>
    on: menu items can have colors if they match one of the regex in config
    file; menu headings, menu prompt can also be in color (based on menu_headings option).
    off: menu items won't have colors, but menu headings, menu prompt still
    will feature colors (based on menu_headings option); those are not impacted by turning
    off menucolors.
2023-11-16 17:57:22 -05:00
nhmall
bb10f9a5d0 more menu header tweaking re options
<color>
off: map, menu items, menu headings, menu prompt/title all, everything should have color suppressed.

<curses guicolor>
on: map, menu items, menu headings, menu prompt/title can all feature color, as can
menu borders, menu-selector letters.
off: map, menu headings, menu prompt and menu items (menucolors on) can still feature color,
but all other non-map features such as menu borders, menu-selector
letters will not have color.

<menucolors>
on: menu items can have colors if they match one of the regex in config
file; menu headings, menu prompt can also be in color (based on menu_headings option).
off: menu items won't have colors, but menu headings, menu prompt still
will feature colors (based on menu_headings option); those are not impacted by turning
off menucolors.
2023-11-16 13:41:07 -05:00
nhmall
7beef848c4 fix a strange bug with option menu
It was impossible to select entry 62 in the allopt[] array
from the 'm O' menu, apparently because of a collision with
the ascii value of a question mark.

Entry 62 was currently the guicolor option.
2023-11-16 07:56:01 -05:00
nhmall
d76176c41b pass menu_headings not test value for title 2023-11-16 06:01:07 -05:00