Commit Graph
100 Commits
Author SHA1 Message Date
Pasi Kallinen 98383f7a46 Win32GUI: Prevent ampersand-escaped mnemonics in menus 2017-09-18 15:30:52 +03:00
Pasi Kallinen 5e05cdc570 Change some regex stuff to use config errors 2017-09-17 13:43:48 +03:00
Pasi Kallinen 45401a13bb Show regex error before asking for color
When entering a new menucolor via options, show regex error
immediately afterwards, instead of asking for color and attribute
before showing the error.

Also actually show config errors even if config error handler
hasn't been initialized.
2017-09-17 13:20:28 +03:00
Pasi Kallinen 78e5c9a10a Win32GUI: Allow empty separator lines in menus 2017-09-17 12:17:46 +03:00
Pasi Kallinen 11863dd5e9 Read symbols with config file handler
Also, make config file error handler able to cope with recursion.
2017-09-17 10:15:08 +03:00
Pasi Kallinen 2db7e20116 Fix invisible gold symbol in status lines 2017-09-16 23:49:28 +03:00
Pasi Kallinen f36d1036de Show in wizmode level teleport menu your current location 2017-09-16 18:19:25 +03:00
Pasi Kallinen 52ed881b2c Remove overview for wizmode regenerated map
The wizmakemap command throws away the current level, so don't keep
the overview data for it around.
2017-09-15 14:45:51 +03:00
Pasi Kallinen f8bd77ae03 Use symbolic names for shop repair costs
...and add costs to two places where the door you touched
blew up (picking the lock and opening the door).
2017-09-14 21:07:18 +03:00
Pasi Kallinen cfedd8659d Minor reformat, fix warnings 2017-09-14 14:40:11 +03:00
Pasi Kallinen 0753a0751e Move BoH item loss into separate function 2017-09-14 14:11:09 +03:00
Pasi Kallinen 127f74bb24 Fix more warnings 2017-09-13 14:12:38 +03:00
Pasi Kallinen 1e22a9aaf7 Win32GUI: Allow toggling mouse_support off
Prevents accidental mouse clicks on the map
2017-09-13 14:02:43 +03:00
Pasi Kallinen bd7568b71d Fix compile warnings 2017-09-13 13:59:25 +03:00
Pasi Kallinen b6737fd1f6 config parse return values and error msgs 2017-09-13 13:26:37 +03:00
Pasi Kallinen 2c688a12d5 Handle config file reading at single function
The function handles comments, empty lines, config sections,
CHOOSE, and line continuation, while calling another function
for other lines.

Currently used for config file, sysconf, and WIZKIT.
2017-09-13 12:27:38 +03:00
Pasi Kallinen cbd5934a1a No secure config errors in linux hints file
The linux hints file is for a single-user build, no need for this.
2017-09-10 21:31:41 +03:00
Pasi Kallinen 9c118b5b6b Secure config errors
If user can make NETHACKOPTIONS point to a file, that user could then
get the file contents via the extended config file error reporting.
Add CONFIG_ERROR_SECURE compile-time option to make that case output
only the first error, no line number or error context.
2017-09-10 21:05:51 +03:00
Pasi Kallinen a4becd6970 Last of the config error handling 2017-09-09 18:10:15 +03:00
Pasi Kallinen b9c52ff31c Even more config error handling 2017-09-09 17:41:08 +03:00
Pasi Kallinen 873590afc1 More options parse return values 2017-09-09 14:03:28 +03:00
Pasi Kallinen cfb09c9bf8 Handle windowtype and CHOOSE config errors 2017-09-09 13:50:34 +03:00
Pasi Kallinen 87f991ecfc Show error on unknown line 2017-09-09 13:25:46 +03:00
Pasi Kallinen f8211f69f2 Improve config file error reporting
Show the original line from the config file, followed by the line number and
a specific error message. Also show all errors from the config file before
waiting for key press.
2017-09-09 13:04:08 +03:00
Pasi Kallinen 697d2953ff Fix proto decl 2017-09-02 18:51:45 +03:00
Pasi Kallinen 27b483c1a8 Remove unused variable 2017-09-02 15:22:42 +03:00
Pasi Kallinen bfad877fba Add optional config file sections, selected with CHOOSE
Allows the user to define arbitrarily named optional sections
in the config file, and select which of those sections are used.

For example:

  OPTIONS=color
  CHOOSE=char A,char B

  [char A]
  OPTIONS=role:arc,race:dwa,align:law,gender:fem

  [char B]
  OPTIONS=role:wiz,race:elf,align:cha,gender:mal
2017-09-02 12:21:51 +03:00
Pasi Kallinen 26328d28ab Default menucolors for Windows 2017-09-01 12:45:28 +03:00
Pasi Kallinen ecdebff121 Typofix 2017-09-01 12:20:21 +03:00
Pasi Kallinen ffb3f12997 Fix pile display when picking up items while invisible
Reported directly to the devteam. Set hilite_pile on, become
invisible, pick up all but one item from a pile on the floor,
the pile symbol was still there afterwards.

This is yet another case of evil hack, because the gbuf doesn't
distinguish between object piles and single items, see
commit 854fe40609
2017-09-01 09:43:36 +03:00
Pasi Kallinen 7e793a09d7 Add database entry for "martial arts" the skill 2017-08-28 20:40:41 +03:00
Pasi Kallinen 30aea05f47 Minor Guidebook tweakage 2017-08-24 22:59:46 +03:00
Pasi Kallinen 23be1b81d2 Typofix in Guidebook.tex 2017-08-24 10:34:37 +03:00
Pasi Kallinen ef9d198d53 Explain "no travel path" in Guidebook 2017-08-24 10:33:23 +03:00
Pasi Kallinen d1b4253307 Fix reversed stinking cloud targeting logic
...and give indication when blessed scroll of fire was targeted
at illegal position.
2017-08-24 09:04:54 +03:00
Pasi Kallinen c7d13d6fa3 Make blessed scroll of fire useful
Blessed scroll of fire allows to choose the explosion location like
scroll of stinking cloud does. This should make it somewhat useful
in the early game.
2017-08-23 23:35:53 +03:00
Pasi Kallinen 73d36b59dd Typofix 2017-08-21 12:00:08 +03:00
Pasi Kallinen 1854d21dd7 Update NetHackW.exe version details 2017-08-20 23:44:35 +03:00
Pasi Kallinen 1eca824321 Add sysconf BONES_POOLS to allow more bones-files per level
Reduce the chance of a player playing on a public server encountering
their own bones, by implementing separate bones pools. The pool a player
belongs to is determined at game start, and only bones in that pool
are used. The sysconf BONES_POOLS allows the sysadmin to define how
many pools there are.
2017-08-20 23:04:59 +03:00
Pasi Kallinen 7bb4cb1b1e Silence some warnings 2017-08-19 19:23:47 +03:00
Pasi Kallinen a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen 831ce24a57 Enable dumplog for winnt 2017-08-19 14:29:18 +03:00
Pasi Kallinen 189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
Pasi Kallinen 9eae5a8c4b Fix thinko on preprocessor conditional 2017-08-19 13:47:41 +03:00
Pasi Kallinen 42a3f9d906 Silence another warning 2017-08-19 13:44:08 +03:00
Pasi Kallinen d1c1fd5faf Fix syntax error 2017-08-19 13:40:47 +03:00
Pasi Kallinen a552956f7a Silence some warnings 2017-08-19 13:38:38 +03:00
Pasi Kallinen bbc3cee759 Fix minor diffs between Guidebook.mn and .tex 2017-08-17 23:30:36 +03:00
Pasi Kallinen 00aae6b684 Remove erroneous bolding from Guidebook.mn 2017-08-17 23:18:41 +03:00
Pasi Kallinen 152ddf4a4b Unify strength string 2017-08-06 22:56:07 +03:00
Pasi Kallinen 1f671b962c Demangle clang formatted code 2017-08-06 20:27:48 +03:00
Pasi Kallinen 4e05de9bff Add whatis_moveskip option to change fast-moving cursor
Previously the "fast-moving" when getting a target location
was always by 8 units. If this option is on, fast-moving
will instead skip the same map glyphs. This should be much more
useful for blind players.
2017-08-06 15:41:31 +03:00
Pasi Kallinen 4d7d63814a Throne room's throne is occupied by a king
Based on a patch by Leon Arnott
2017-08-04 23:15:30 +03:00
Pasi Kallinen b6d1ee3320 Using a cursed tin whistle in a vault summons the guard
...since guards respond to shrill whistles.
Based on a patch by Leon Arnott.
2017-08-04 22:41:26 +03:00
Pasi Kallinen e2904012b7 Show current timeouts in #wizintrinsic 2017-08-04 21:41:04 +03:00
Pasi Kallinen b4e4d70008 Fix couple static code analyzer warnings 2017-08-02 19:48:44 +03:00
Pasi Kallinen b13bae91dc Add way to cycle through valid locations for polearm or jump target 2017-07-31 19:10:26 +03:00
Pasi Kallinen 439028dcae Add whatis_filter option to filter eligible map locations for travel
Compound option whatis_filter, filters the eligible map locations
when getting a cursor location for targeting. Accepts 'n' (none),
'v' (map locations in view), or 'a' (map locations in the same area,
eg. room or corridor).
2017-07-31 16:58:23 +03:00
Pasi Kallinen 8180310630 Make #wizmakemap handle unpaid items and punishment 2017-06-28 00:40:00 +03:00
Pasi Kallinen 05e6255bf8 Show more properties in wizmode #timeout 2017-06-25 16:13:23 +03:00
Pasi Kallinen 60443a4ee7 Add sanity checking for long worms 2017-06-16 18:27:25 +03:00
Pasi Kallinen 08fe086124 Show control key combos with uppercase alpha
Instead of ^r, show ^R, as that one is used everywhere.
2017-03-13 20:32:46 +02:00
Pasi Kallinen f9438f6e53 Document explicitly what m-prefix does to each command 2017-03-13 17:17:58 +02:00
Pasi Kallinen 7d8b4d4f97 Add end-of-game dumplogs
This is based on the "new" dumplog patch for 3.6.0, by Maxime Bacoux.

Define DUMPLOG to enable. By default only enabled for the TTY linux.
2017-02-19 15:33:27 +02:00
Pasi Kallinen 76d7044872 Fix #H5056/bz1086: Bug in Achievement Recording
Bug report was:

> "Completed sokoban" achievement was logged when picking up
> a randomly generated bag of holding in the gnomish mines.

The picking-up code was missing checks for the branches, so
you could get the achievements outside the correct branches.
2017-02-06 16:52:40 +02:00
Pasi Kallinen 0714e38d28 Allow changing max name len via hints file 2017-02-05 09:59:56 +02:00
Pasi Kallinen ac2fc526eb Fix complaint about uninitialized variable 2017-01-27 07:35:46 +02:00
Pasi Kallinen 63b0db8724 Fix Valgrind complaint of uninitialized memory 2017-01-24 20:56:15 +02:00
Pasi Kallinen fedcfac0f3 Fix use of freed memory when snuffing a potion of oil 2017-01-24 20:19:37 +02:00
Pasi Kallinen 569a14488c Document paranoid_confirm:all 2017-01-23 17:14:04 +02:00
Pasi Kallinen 02195d7351 Prevent a segfault with leashed vanished monster
It's apparently somehow possible to have a leash "attached" to
a monster not present on the current level. Complain instead of
segfaulting. (This is a post-3.6.0 bug)
2017-01-19 19:49:19 +02:00
Pasi Kallinen c6f26c05d7 Accessibility: option to prevent status line updates
Apparently some screen readers keep reading the status lines
at the bottom of the screen when parts of those change.
Add an option to prevent updates to those lines.
2017-01-10 22:19:03 +02:00
Pasi Kallinen 3ea12fe048 Show all statusline info in #attributes 2017-01-10 20:45:16 +02:00
Pasi Kallinen 131ab0a20e Fix mnearto return value confusion
This caused appeased shopkeepers returning to their shops being killed.
2017-01-01 00:21:57 +02:00
Pasi Kallinen 79870d33be Silence Yet Another Valgrind complaint 2016-12-29 19:19:00 +02:00
Pasi Kallinen 24f934dfea Silence some Valgrind errors
Need to have the allocated memory explicitly cleared for Valgrind
to know it.  We should probably start using calloc or something...
2016-12-28 22:52:08 +02:00
Pasi Kallinen 1a1adfee3e Fix valgrind complaint in wizmode terrain
The code was writing characters into row[x-1] in the loop, but putting the
string terminator at row[x], leaving one character between uninitialized.
2016-12-23 13:34:10 +02:00
Pasi Kallinen f4632732ac Fix wishing for tins of specific type
I believe this bug already existed, but was only exposed by
my wishing parser change post-3.6.0
2016-12-14 18:28:01 +02:00
Pasi Kallinen f3b1cc74c6 Set max players in sysconf, not in the shell script 2016-12-14 16:49:52 +02:00
Pasi Kallinen 86df94b281 Impossible instead of segfault in cursed
While fuzz testing, I've seen segfault a handful of times in here,
coming from do_takeoff(). Looks like context.takeoff.what is stale,
having WORN_BLINDF, but we're not wearing the blindfold anymore.

Haven't been able to trace it down yet, so guard it with impossible.
2016-12-12 17:42:06 +02:00
Pasi Kallinen 97ffc0f53d Fix segfault when attacked while polyed into disenchanter
The pointer keeping tabs of monster's current weapon was
not cleared.

How to trigger: Get hit by a monster wielding a weapon,
teleport to another level, poly into disenchanter, get hit
by any monster with AD_PHYS attack and not wielding any weapon.
2016-12-07 20:23:17 +02:00
Pasi Kallinen b8d8556eff Fix some issues found with fuzz testing
Mostly to do with relocating monsters when the level is already full,
and unsticking a monster if it gets relocated.
2016-12-07 17:53:08 +02:00
Pasi Kallinen daff7653f8 Add missing symbols to Blank symset and Guidebook 2016-12-04 21:38:59 +02:00
Pasi Kallinen 5da34b7db6 Fix segfault when looking at detected monster hiding under unknown armor
This segfault happened when a detected monster such as a garter snake was
hiding under an unknown/unseen armor of a type that has no description
field (eg. a leather armor), and you farlooked at the monster.

At the same time, simplifies the code a tiny bit.
2016-12-02 22:12:44 +02:00
Pasi Kallinen b0c68714ce Make Ogresmasher grant 25 constitution 2016-11-14 20:22:33 +02:00
Pasi Kallinen 06bd0d426b Make Dragonbane confer reflection when wielded 2016-11-14 19:34:20 +02:00
Pasi Kallinen 84dc214e5c Fix wrong material for novels
HI_PAPER is color, PAPER is material - the novel object definition
was using the wrong one. The caused the novel material to be gold.
2016-11-13 15:25:43 +02:00
Pasi Kallinen 897916f921 Sanity check for returning Mjollnir animation 2016-11-11 18:18:55 +02:00
Pasi Kallinen f4acfd7995 Make older corpses not taste okay
Post-3.6.0 change made practically all corpses taste okay.
Change it so there's always a 10% chance for the corpse
to taste terrible, and increase the chance if the corpse
is slightly old.
2016-10-27 21:44:44 +03:00
Pasi Kallinen bf1c81c0b4 Accept custom level annotations at the level teleport prompt
via UnNetHack, original implementation by aaxelb
2016-10-18 23:19:16 +03:00
Pasi Kallinen 1506572ea0 With fragile wands, use snap instead of break 2016-10-18 19:42:20 +03:00
Pasi Kallinen f106b578a2 Wielding Demonbane prevents demons summoning friends 2016-10-18 18:07:53 +03:00
Pasi Kallinen 14bd550481 Wielding Trollsbane prevents trolls from reviving 2016-10-15 19:47:04 +03:00
Pasi Kallinen 35f46a0149 Put throne room gold in the chest 2016-10-15 10:26:20 +03:00
Pasi Kallinen 17e13f1e53 X11: Handle define-lines in NetHack.ad
xrdb can load a X recource file with #define-lines, but NetHack
cannot. Substitute the defines in Makefile during compile.

Requires grep
2016-10-14 16:50:25 +03:00
Pasi Kallinen abb4f0fab2 Allow toggling menu for any travel target list 2016-10-13 20:16:21 +03:00
Pasi Kallinen 4af4fc1143 Occasionally remove maze dead ends, creating loops 2016-10-12 18:39:24 +03:00
Pasi Kallinen 9858e46f64 Show correct keybind in ext cmd list 2016-10-11 23:03:36 +03:00
Pasi Kallinen 23157c4830 Free allocated memory 2016-10-11 18:34:41 +03:00
Pasi Kallinen 09c517e830 Fix valgrind complaint 2016-10-11 17:59:35 +03:00