Commit Graph

12602 Commits

Author SHA1 Message Date
Pasi Kallinen
76381815f3 Add theme room: Ghost of an Adventurer 2022-01-02 19:51:32 +02:00
Pasi Kallinen
f405d3bfbc Add few hallu colors 2022-01-02 15:10:32 +02:00
PatR
f1300f87c1 remove duplicate code in set_option_mod_status()
Remove a duplicate option name lookup loop.  At one time the first
loop checked boolean options and second checked compound options,
but that changed a couple of years ago so that both loops check all
options and the second one became redundant.
2022-01-02 02:03:49 -08:00
PatR
37ce6f72b3 Qt without tiles
When tiles fail to load, the Qt interface switches to the text map.
But it wasn't inhibiting the player from trying to switch to tiles
map.  Also, when the text map was in use it was forcing the paper
doll inventory subset to be disabled regardless of whether the map
was by choice or because tiles wouldn't load.  Allow the paper doll
in combination with the text map if tiles got loaded successfully.
2022-01-02 01:48:07 -08:00
PatR
30a0cab66f tiled_map option
It was possible to toggle ascii_map On (which toggles tiled_map Off)
and Off (so tiled_map On) during play, but tiled_map was marked as
config-file only so the converse pair of operations weren't allowed.
Allow tiled_map to be toggled On or Off during play.
2022-01-02 00:35:52 -08:00
Pasi Kallinen
3e620e06eb Define extra sanity checks if not a release 2022-01-02 01:14:16 +02:00
nhmall
2e54e29dca ensure a sane startup color for windows console 2022-01-01 17:44:14 -05:00
Pasi Kallinen
1cc31f3cba Init variable just in case 2022-01-01 16:58:34 +02:00
Pasi Kallinen
0f132470c7 Allow tipping container directly into another 2022-01-01 16:15:29 +02:00
PatR
edf0e3e673 add Lua to Qt's "About nethack"
Add "Lua" and its version number of the 'About' popup.  No copyright
information is included since neither nethack's nor Qt's is shown.

Lua copyright text is included in the output of '#version'.
2021-12-31 18:15:34 -08:00
PatR
f96d1b4342 Qt tiles file loading
Redo how Qt retries if it can't load the primary tiles file.
2021-12-31 15:29:10 -08:00
PatR
4f1c213516 more NO_TILE_C
When USE_TILES is disabled, don't let wc_tiled_map be the default.

Qt is capable of showing an (ugly) ascii map, and will do so if built
with NO_TILE_C after this fix (it defaults to tiles without this),
but it requires that a tiles file be loaded because it displays tiles
in other places besides the map, like role selection.  So it can't
skip them when wc_ascii_map is set.
2021-12-31 15:02:35 -08:00
PatR
d19e80ae2f NO_TILE_C => no USE_TILES in tile.c
Compiling with NO_TILE_C defined results in preventing USE_TILES
from being defined and that causes display.c to use alternate code.
Construct src/tile.c such that nethack links successfully if the
configuration specifies NO_TILE_C but the Makefile goes ahead and
builds tile.c, compiles it, and links with it, otherwise it conflicts
with that alternate code.  Prior to this, linking gave two complaints
about duplicate symbols and failed.
2021-12-31 13:49:43 -08:00
nhmall
eddbff351e change MacOSX to MacOS in version display 2021-12-31 16:44:15 -05:00
nhmall
07575f6344 macOS homebrew qt@5
Once 'brew update' and 'brew upgrade' had been done, the qt@5
package did become available for installation and the original
line in the hints file worked, so put it back as it was.
2021-12-31 16:06:30 -05:00
nhw_cron
af35e7ab61 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-12-31 14:28:48 -05:00
Pasi Kallinen
8db18275a6 Define engulfing_u, making clearer code 2021-12-31 21:12:21 +02:00
nhmall
776064933a linux-minimal hints was used with the CI 2021-12-31 14:02:35 -05:00
Pasi Kallinen
2591a21cf0 Leprechauns bury their gold after teleporting 2021-12-31 18:48:44 +02:00
nhw_cron
4f9e763f5b This is cron-daily v1-Jan-20-2020. files updated: Files 2021-12-31 09:47:53 -05:00
nhmall
7a44b3b52e hints updates
move out-of-date hints files to the outdated folder.

rename the hints files, and hints/include files that are currently
named *.2020 to *.370 (next release number).
2021-12-31 08:48:24 -05:00
PatR
f0d971fc2a Qt splash code
Move the handling for the Qt interface's splash window into its own
routine to unclutter the constructor for QtBind.  Also, don't load
nhsplash.xpm if OPTIONS=!splash has been specified.
2021-12-31 01:53:46 -08:00
nhmall
5ac71e66d5 sync linux.2020 topology with macOS.2020 2021-12-30 18:05:45 -05:00
PatR
3d4ebb8450 Qt map column 0
Column 0 ought to be suppressed like it is for tty and curses (not
sure about X11 or Windows GUI), but until that happens, display it as
'nothing'.  The glyph overhaul not too long ago resulted in it being
shown as a column of giant ants.

We ought to have some special 'none of the above' tile #0 that will
stand out enough to be reported and fixed.  Glyph #0 too.
2021-12-30 14:07:59 -08:00
nhmall
92879378ba remove qt-specifc hints file 2021-12-30 16:27:02 -05:00
nhmall
3cb78eaefc macOS homebrew Qt5 build fix
I had to revert this line in order to build on macOS Monterey.
2021-12-30 15:36:59 -05:00
nhmall
5d26ee0a4c Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2021-12-30 15:15:39 -05:00
nhmall
b633bf46f9 qt6 support follow-up
encompass Qt6 support in the common hints file macOS.2020 instead
of a separate macOS.2020-qt6, which had already diverged and would
likely be a maintenance headache.

From the Makefile perspective:
WANT_WIN_QT=1 will default to Qt5
WANT_WIN_QT5=1 will assume Qt5
WANT_WIN_QT6=1 will assume Qt6

You must have the appropriate Qt installed, of course.
I expect some additional fine-tuning will be needed as this gets
tried out.
2021-12-30 15:11:49 -05:00
PatR
f7c71b9f83 Qt vs C() macro
Our C() macro conflicts with Qt6 usage, so #undef C has added.  Move
that from nearly every qt_*.cpp into qt_pre.h where other similar
fixups are handled.
2021-12-30 11:29:03 -08:00
Michael Meyer
221e4a760d Fix: chameleon quickmimic not reset after eating
finish_meating was checking whether the monster in question was a
chameleon/shapechanger, rather than whether it was a mimic, in deciding
which monsters should be allowed to maintain their current appearance
once they finish eating.  This meant that true mimics had their
appearance reset, while a chameleon, vampire, etc, who ate a mimic
would maintain their appearance as a tripe ration even after they had
finished eating and resumed their normal behavior.  The result?  An
amazing living tripe ration which followed the hero around throughout
the level.
2021-12-30 21:14:08 +02:00
HMM
706b1a939b Have the '$' command include gold in your pack
In verbose mode, the gold in your wallet is totaled separately from
that in containers in your pack, and the two are listed separately.
In terse mode, just print the total of both.

Only known gold is mentioned.
2021-12-30 21:12:38 +02:00
PatR
b7688ca1cf Merge branch 'Qt6' into NetHack-3.7 2021-12-30 11:07:07 -08:00
PatR
24c9f79aa5 fixes entry for Qt6 support
I had a minor merge issue when incorporating Ray's Qt6 port from
github.com/chasonr/NetHack/Qt6 but it got resolved.  This still builds
with Qt5 (and that's the only aspect I've been able to test) but is
supposed to work with Qt6 too.  It adds a new hints file for OSX and
someone might need to create a comparable one for linux.  Or maybe
the differences can be folded into the existing hints as conditional.

Closes #525
2021-12-30 11:06:29 -08:00
George Edward Bulmer
b019f51fd2 Make amnesia drain training to appropriate level
When amnesia drains your skills the skill training would be set
to a random amount rather than a random valid amount for the new
level of skill.

This meant that, for example, you could have Master skill level in
martial arts but with the training amount of Basic.

Attempts to retrain to level martial arts to Grand Master would
then take an extraordinary amount of time compared to usual.

Fix taken from Evilhack
2021-12-30 21:04:20 +02:00
PatR
0f6ed46b8f Merge branch 'Qt6' 2021-12-30 10:56:28 -08:00
Ray Chason
1f2a1efee5 Use QApplication::desktop for screen size on Qt5
5.15 has QWidget::screen, but older versions don't.
2021-12-30 10:56:07 -08:00
Ray Chason
1f7541e496 Changes for Qt 6 on MacOS 2021-12-30 10:56:06 -08:00
HMM
0aafe11515 Don't erase Elbereth when monster steps into a pit or hole dug by you
Elbereth was fading when offscreen monsters stepped into
pits or holes dug elsewhere on the level. This was happening
because monsters falling into traps set by you were calling
setmangry() as if you had just attacked them. The behavior
made it unsafe to use Elbereth if you've dug down anywhere
else on the level, making it a bit harder to get archeologists
off the ground.
2021-12-30 20:46:06 +02:00
RojjaCebolla
381ed08366 Correct the genders of DCSS bogusmons
Reference: https://github.com/crawl/crawl/blob/master/crawl-ref/source/mon-data.h
2021-12-30 20:38:15 +02:00
Pasi Kallinen
d53cd28d46 Make extended commands return defined flags
Instead of returning 0 or 1, we'll now use ECMD_OK or ECMD_TURN.
These have the same meaning as the hardcoded numbers; ECMD_TURN
means the command uses a turn.

In future, could add eg. a flag denoting "user cancelled command"
or "command failed", and should clear eg. the cmdq.

Mostly this was simply replacing return values with the defines
in the extended commands, so hopefully I didn't break anything.
2021-12-30 19:16:33 +02:00
PatR
511ce70309 add new TODO item to Qt status: tool tips 2021-12-29 11:39:57 -08:00
Pasi Kallinen
fa41d5fe66 Apply a wielded polearm with fire-command
Wield a polearm and use 'f'ire to automatically hit with it,
if there's a single valid target.
With fireassist-option, will swapweapon to a polearm.
This only applies if quiver is empty and autoquiver is off.
2021-12-29 19:40:26 +02:00
PatR
3536ede5bd makedefs.c comment typo 2021-12-29 03:16:31 -08:00
PatR
bc9cb7f7b8 no USED_SOUNDS option parsing bit
If the program is build without USER_SOUNDS and encounters any SOUND
or SOUNDDIR directive when parsing the run-time config file it only
issues an error message about the first one.  When finished parsing,
have it include suppressed ones in the count of errors encountered.
2021-12-29 02:21:13 -08:00
PatR
fdc6914926 Qt paper doll fix for two-handed weapons
Allowing optional arguments can be risky.  The recent glyph changes
added a new argument to the routine that constructs a mirror image
of a tile but not to the call to that routine.  Because an existing
argument was optional, the compiler didn't complain about the new
one being missing.

Obsolete optional 'fem' argument ought to removed but this doesn't
tackle that.
2021-12-29 02:13:34 -08:00
Ray Chason
35c12e2518 Use QApplication::desktop for screen size on Qt5
5.15 has QWidget::screen, but older versions don't.
2021-12-29 01:44:02 -05:00
Pasi Kallinen
ea0c488178 Split leprechaun avoidance into separate function 2021-12-28 19:11:30 +02:00
nhmall
2b197fbc33 Merge branch 'pr645' into NetHack-3.7 2021-12-28 08:43:07 -05:00
nhmall
67e7632e38 Merge branch 'libnethack-target-fixes' of https://github.com/dextercd/NetHack into pr645 2021-12-28 08:41:35 -05:00
nhmall
a194194039 more possible build fixes
Once again, I need to commit these first and observe the CI results
afterwards to verify the results.
2021-12-28 08:04:59 -05:00