Builds for:
sys/msdos/Makefile.GCC - for local build on msdos itself (untested)
sys/unix/NetHack.xcodeproj/project.pbxproj - for Xcode build
sys/windows/Makefile.gcc - for Windows build via Ming-w64 (untested)
sys/windows/Makefile.msc - for visual studio nmake build
sys/windows/vs/files.props for visual studio solution/project build
Move the help text for the 'O' command from the code into its own file
and allow that to be accessed from the '?' menu as well as by choosing
entry '?' in the 'O' menu.
sys/unix/Makefile.top has been updated to handle new 'optmenu', others
need to catch up. The game will still build and run without the file
but asking for options menu help won't work until they do.
Message shown when hero sees a monster's wet towel become less wet:
"<Mon>'s {moist|wet} towel drie[ out]." Corresponding message for
hero's towel spelled "dries" correctly.
Reported for to-be-3.7 but present since 3.6.0.
This is a bit more complicated but far less intrusive. Instead of
three dozen lines of introductory text before the menu entries start,
it now has one extra menu choice at the start:
|
| For a brief explanation of how this works, type '?' to select
| the next menu choice, then press <enter> or <return>.
|? - view help for options menu
| [To suppress this menu help, toggle off the 'cmdaddist' option.]
|
Picking '?' shows essentially the same text as was in-line text in
the menu before. Then doset() goes back to the start and re-runs the
options setting menu but without that extra entry the second time.
Kicking a door can produce "WHAMMM!!!". "Wham" doesn't necessarily
imply any noise but there's a strong suggestion that it does, so a
deaf hero shouldn't be able to hear it. Give alternate feedback,
"Thwack!!" when deaf, and sometimes give that even when not deaf.
Also tone down "WHAMMM!!!" to Whammm!!".
For Qt's extended command selector, gray out the button for "repeat"
because picking it just causes the '#' command that led to that to
be repeated, bringing the extended command selector up again.
It can be chosen by typing "rep" but at each keystroke the grayed
out button is visible so having that behave differently from what
was probably expected should not come as a surprise.
The substantial increase in extended commands has forced the grid of
commands to be expanded, otherwise the bottom of each column ends up
off the bottom of the screen.
The widget supporting the '#' command doesn't include scrollbars.
It really needs to be able to include those when needed but I don't
know how to do that.
Changes most of the special keys used in the main input loop
into extended commands:
- movement keys are now bound to extended commands, eg.
#movewest and so on.
- m-prefix is now #reqmenu extended command, still bound to
the 'm' key.
- run, rush, and fight are now extended commands, still bound
to the same keys as previously.
- nopickup and runnopickup keys are removed.
Nopickup was using 'm' key, the same as the m-prefix, so
allow #reqmenu to modify movement commands to disable pickup.
- multiple prefix commands are allowed. This lets user to
use #reqmenu, followed by #run, followed by movement to simulate
runnopickup behaviour. (If necessary, adding runnopickup back
as an extended command would be easy)
The reason that the QT6.2 build on Linux was getting a warning
on qt_main.cpp, but the QT6.2 build on macOS was not, was
because of a difference in compiler flags between clang++ and g++.
clang++ was using the
-Wno-deprecated-declarations
and g++ wasn't, so add it.
unpaid_cost(): 'shkp' might be used without being initialized. That
sort of warning is sometimes wrong but was correct in this instance.
qt_Splash(): the Qt 6.2 warning suggests switching the argument for
setMask() from QBitmap() to fromPixmap() but that doesn't work with
5.11. However, switching from setMask() to setPixmap() does work,
and results in a crisp splash image instead of the fuzzy one I
recently complained about. I've no idea what the right QT_VERSION
check ought to be but another QLabel propery is documented as "added
in 4.2" and the pixmap one has no such mention so I picked Qt < 4
for the code that's been in use and Qt >= 4 for the new code.
and rename {roles,races}[].malenum to {roles,races}[].mnum.
Pull request #653 from entrez. Male and female player character
monsters are no long separate even when their title's differ and all
the entries for femalenum in the roles[] and races[] arrays were set
to NON_PM (meaning not used in this case).
The update in the pull request overlooked win/Qt/qt_plsel.cpp which
had four references to .malenum so this is more than just the fixes
entry.
Closes#653
There are no longer distinct gendered versions of monsters, so femalenum
is unused (i.e. set to NON_PM) for all roles and races. Take a pass at
removing all uses of/references to femalenum, and rename 'malenum' to
'mnum' since it no longer has any particular association with
gender or sex.
Pull request #654 from entrez: the change to avoid impossible
"unpaid_cost: object wasn't on any bill" when examining inventory
while in a wall shared by multiple shops didn't work correctly for
shop-owned objects inside hero-owned containers (which worked prior
to that change).
Not fixed, and possibly not going to be: if a hero-owned container
holds items from more than one shop, the cost appended to those items'
inventory entries might show the wrong amount if the relevant code
picks the wrong shk. Presumably the wrong amount can also happen if
player puts items from one shop into a container owned by another
shop.
Closes#654
Recent commit 5c14f3e fixed an issue with unpaid_cost when the hero is
in two shops at once (e.g. phasing through a shared wall), but
introduced new problems with finding the cost of a container with unpaid
contents -- an unpaid item in a player-owned container would generate
the same "unpaid_cost: object wasn't on any bill" impossible as the
issue the commit fixed.
The main issue was that finding the bill entry used to depend on finding
the shopkeeper, but after the change, finding the shopkeeper depended on
finding the bill entry; for a container with unpaid items which has a
shopkeeper, but no bill entry, this caused issues.
Revert part of 5c14f3e and tackle the problem another way, which should
correctly handle unpaid items in inventory or a container, even if they
belong to a mixture of different shops and/or the hero is on a space
shared between multiple shops.
When a flying hero deliberately "swoops" through a trap door or hole,
consider the movement down to the next level to be controlled flight
rather than falling, preventing the sort of inadvertent touching of a
carried cockatrice corpse that happens when falling between levels.
A couple of additional things witnessed in between the frequent adds
shown by youtube (top prize goes to the recurring popup ad advertising
popup blocking).
He knew that ^D meant a control character but thought that he had to
type Ctrl+Shift+d instead of just being able to type Ctrl+d. And he
had no idea what "meta key" meant. (I don't think I've ever seen a
key labeled that myself.)
I don't care for this very much at all, but making it shorter will
reduce its usefullness. It addresses one of the struggles exhibited
in the "a man and his cat" youtube video, where he was baffled when
selecting booleans didn't change their values and he later used Esc
instead of Enter after eventually finding number_pad.
This inserts some explanatory text (around three dozen lines,
unfortunately) at the start of 'O's menu. Some of it is general menu
stuff, some is specific options stuff, and some attempts to fend off
various bug reports about options that do or don't persist across
save and restore or RC revisions that seem to have no effect.
The new introductory text can be disabled by turning off cmdassist.
Players who already do that don't need to see this. Many who ignore
cmdassist and occasionally endure an outburst of compass directions
are likely to be goaded into turning it off. I hope we won't need a
new 'optassist' for players who want to skip this but leave cmdassist
in general on.
It doesn't attempt to address his attempt to use arrow keys (possibly
arrows overloaded on number pad keys, or perhaps just digits on the
number pad while numpad mode was off) to navigate the menu then having
the Windows port 'helpfully' change those into hjkl which resulted in
selecting and subsequently unintentionally toggling some options on
the first page. One was 'color' which he did notice and then re-run
'O' to successfully toggle it back on. There was at least one other
which he either didn't notice to didn't both to reverse.
Fix the reported bug of using Passes_walls to carry an unpaid item
from inside a shop into the wall it shares with another shop
producing a situation where examining inventory issued an impossible
"unpaid_cost: object wasn't on any bill" when trying to append the
cost to the formatted inventory line. u.ushops[], u.ushops0[], and
others are lists that can have up to four entries and the relevant
code was only checking the first one.
Not mentioned in the report: continuing another step into the other
shop didn't get recognized as robbing the first shop, for a similar
reason.
For either of these bugs, digging a breach in the wall, paying off
the miffed shopkeeper, then stepping into the breach before it gets
repaired will probably trigger the same results without the need for
polymorphing into a xorn or earth elemental. But not on the tourist
goal level test case since walls there are undiggable.
I didn't go looking for other instances of not checking all relevant
shopkeepers. It wouldn't surprise me if there are some more.
In file included from ../include/hack.h:217,
from ../win/Qt/qt_plsel.cpp:18:
../win/Qt/qt_plsel.cpp: In member function ‘void nethack_qt_::NetHackQtPlayerSelector::populate_roles()’:
../win/Qt/qt_plsel.cpp:378:53: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
378 | gf = monnum_to_glyph(roles[i].malenum, is_f ? FEMALE : MALE);
../include/display.h:610:27: note: in definition of macro ‘monnum_to_glyph’
610 | ((gnd == MALE) ? GLYPH_MON_MALE_OFF : GLYPH_MON_FEM_OFF))
| ^~~
../win/Qt/qt_plsel.cpp: In member function ‘void nethack_qt_::NetHackQtPlayerSelector::populate_races()’:
../win/Qt/qt_plsel.cpp:407:53: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
407 | gf = monnum_to_glyph(races[j].malenum, is_f ? FEMALE : MALE);
../include/display.h:610:27: note: in definition of macro ‘monnum_to_glyph’
610 | ((gnd == MALE) ? GLYPH_MON_MALE_OFF : GLYPH_MON_FEM_OFF))
| ^~~
moveloop() has been calling restore_attrib() every turn, and
restore_attrib() loops through all six characteristics every time
to check for ones that have temporary adjustments timing out. But
ATIME(characteristic) is never set anywhere and no time outs would
occur. So delete the call to restore_attrib() from moveloop().
This leaves that no-longer-called routine in place and updates it
to handle Wounded_legs properly in case it ever does get used.
Also, add a comment about "restore ability" not fixing temporarily
lost characteristics due to hunger or wounded legs. And update
unfixable_trouble_count() to check for those so that restore ability
won't say "you feel great" when it fails to fix them.
Wounded_legs was changed from (HWounded_legs || EWounded_legs) to
just (HWounded_legs), but when the timeout code decremented the timer
to 0, HWounded_legs became 0 and heal_legs() operated as if there was
nothing to repair and hero didn't recover from temporarily lost Dex.
Change Wounded_legs back to (HWounded_legs || EWounded_legs).
During role/race/gender/alignment selection, when gender gets toggled
replace the gender-specific role titles and their icons to reflect
new gender value. And enable or disable Valkyrie choice depending
upon the gender value, not just current race value.
This ended up revising a lot of the NetHackQtPlayerSelector code,
eliminating some redundancies and being more careful with the use of
validrace()/validgend()/validalign(). That still isn't bulletproof.
It also changes the two instances of buttonPressed that were drawing
Qt6 warnings from connect() at run-time with buttonClicked. That
works as intended with Qt5 and might eliminate those.
The code to use female player character tiles looks correct to me
but when I toggle gender, role titles change but their icons don't.
I don't know what's going on here. Some ealier code always specifies
MALE but that code isn't used according to various prints to stderr
that I temporarily inserted.