Commit Graph

5604 Commits

Author SHA1 Message Date
PatR
bb72823d7b redo the #H9479 fix - worn dented pot
Handle recently changed armoroff() differently.  There should be no
change in behavior.

boots_simple_name(), shield_simple_name(), and shirt_simple_name()
are for no-delay armor types so won't be called by armoroff().  But
they'll undoubtedly get some use in the future.
2019-12-07 17:26:58 -08:00
PatR
708773c514 color altars
Something I noticed in the hardfought diff what looked interesting.
Unfortunately the most interesting bit turns out to be unuseable.

Display high altars (Moloch's Sanctum and the Astral Plane) in
bright-magenta and unaligned altars (aside from the Sanctum one) in
red.  Hardfought's code also uses white for lawful, gray for neutral,
and black for chaotic, matching the unicorn colors associated with
the alignments.  But those colors don't render in a reliable fashion
(see the comment in mapglyph.c) and become confusing about why they're
used for altars of particular alignments.
2019-12-07 13:44:46 -08:00
nhmall
0c6d801148 Merge branch 'NetHack-3.6' 2019-12-06 17:52:01 -05:00
nhmall
a7ac5ce7f3 article fix for polymorphing steed 2019-12-06 17:50:59 -05:00
nhmall
a512567103 Merge branch 'NetHack-3.6' 2019-12-06 16:48:00 -05:00
PatR
afb4a67f0e PANICTRACE memory leak
Changing from BETA to RELEASED resulted in turning off PANICTRACE
and that exposed a minor memory leak.  Only applies to program exit
so doesn't impact play.
2019-12-06 12:59:18 -08:00
nhmall
e41d7390d5 header should show 3.7 in these files that first appear there 2019-12-05 14:21:58 -05:00
nhmall
a353202e87 more macosx Xcode warning quiets 2019-12-05 12:05:06 -05:00
nhmall
a701c5870d quiet a number of macosx warnings 2019-12-05 11:52:21 -05:00
PatR
565e020573 kinda/sorta fix github issue #246
When picking up from floor or removing from container fails because
there aren't any inventory slots available, pickup/take-out stops.
But the message
|Your knapsack can't accomodate any more items.
is inaccurate if there is gold beyond the stopping point.  Actually
continuing in order to pickup/take-out gold would require substantial
changes, but varying the message to be
|Your knapsack can't accomodate any more items (except gold).
when stopping is a one line fix.  The parenthesized remark is only
added if there is actually some gold after the current object and is
given regardless of whether autopickup happens to be targetting it.

Fixes #246
2019-12-05 02:33:47 -08:00
nhmall
5e5217aceb more versioning bits 2019-12-01 19:38:47 -05:00
PatR
1603267cfa lua version bit 2019-12-01 16:33:01 -08:00
nhmall
a9c946a05f Merge branch 'NetHack-3.6' 2019-12-01 19:30:09 -05:00
nhmall
5de24d2a0d follow-up bit 2019-12-01 19:11:12 -05:00
nhmall
d2d40289e6 update and/or clarify some version references 2019-12-01 19:07:28 -05:00
nhmall
de5580f96e Merge branch 'NetHack-3.6' 2019-12-01 16:49:47 -05:00
PatR
839597eb59 comment bit
'ick' comment was from there were multiple "You finish taking off..,"
strings that only varied by one word.  That was replaced last night.
2019-12-01 07:38:01 -08:00
nhmall
689039b9d7 Merge branch 'NetHack-3.6' part 2 2019-11-30 23:52:39 -05:00
nhmall
3a59b7f210 Merge branch 'NetHack-3.6' 2019-11-30 23:48:03 -05:00
PatR
8f06974414 fix #H9479 - worn dented pot can't be taken off
Taking off no-delay helmets, gloves, and boots were unintentionally
taking off suit instead and stayed worn themselves.  As far as I
saw, only helmet types "fedora" and "dented pot" were applicable;
all gloves and boots have a small multi-turn delay.  This was an
unintended side-effect of the first "slippery gloves" commit so
happened about three weeks ago.
2019-11-30 20:19:10 -08:00
PatR
b7689128e7 mdlib.c tweaks
Eliminate a couple of warnings about unused static routines.
That led to a couple of other things.

I hope I got host vs target right in the mdlib.c '#if's.
2019-11-30 16:59:35 -08:00
nhmall
2a2021d5e4 use the copyright statement provided by the Lua distribution in lua.h 2019-11-30 18:43:57 -05:00
nhmall
719ca3003e remove variable left over from earlier testing 2019-11-30 17:34:10 -05:00
nhmall
c5babb0de1 instance_globals update to include lua_ver storage 2019-11-30 17:24:11 -05:00
nhmall
7031b6b504 get lua version from lua itself 2019-11-30 17:23:14 -05:00
nhmall
4c16417c45 Merge branch 'NetHack-3.6' 2019-11-30 15:53:38 -05:00
nhmall
d2d2887cbc leave option setting as previous (it was not part of the change) 2019-11-30 15:51:58 -05:00
nhmall
3a84bff7f3 Merge branch 'NetHack-3.6' 2019-11-30 15:41:52 -05:00
nhmall
42a13a1198 has_color() performance fixes
Performance profiling showed that multiple strcmpi() calls were
occurring each and every time a character was going to the map.

This update:
- honors the WC_COLOR capability
- It allows a window-port to control individual color availability should the window-port wish to do so.
- Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset.

iflags.use_color remains a master on/off switch for use of color, regardless of the capability
compiled into the game (default TRUE).

The has_color() routine, which is now a shared routine in src/windows.c, could likely be made
into a simple macro to eliminate the function call, but this update does not go that far.

This hits a lot of port files due to the window-port interface change, mostly cookie-cutter.
2019-11-30 11:44:07 -05:00
nhmall
4535a57aba Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-29 22:40:06 -05:00
nhmall
004ac4bb49 insert Lua version
Instead of the hardcoded value that's in this right at the moment,
the intention is to get the Lua version information directly from
Lua itself for the insertion. For now, this will have to do.
2019-11-29 22:37:30 -05:00
PatR
756f6a1006 fix a memory leak
Memory allocated for a trap in getlev() wasn't being freed.  There
is already one extra allocation which is supposed to get freed after
the loop, but the 'keepgoing' flag caused an extra trap allocation
before loop termination.  So the unintentional one got freed but did
so by intercepting the free for the end-of-list one.

Fruit had similar code which applied to full game save and restore
rather than level save and restore so wasn't as noticeable.
2019-11-29 18:31:45 -08:00
nhmall
dd1d978b84 a couple of very minor follow-up bits 2019-11-29 21:19:31 -05:00
PatR
5226726c99 more lua notice from makedefs.c to mdlib.c
Add missing dependency of makedefs needing src/mdlib.c to unix
Makefile.src.
2019-11-29 17:19:37 -08:00
PatR
769799105c move lua notice to makedefs.c and dat/options
Prefix the lua notice with a one-line explanation.  One minor change:
the copyright date didn't match the one from the actual lua notice.
2019-11-29 16:05:14 -08:00
PatR
099fdca8cd no longer used variable 2019-11-29 15:59:50 -08:00
nhmall
453745701f casting lua_tointeger 2019-11-29 17:38:51 -05:00
nhmall
f41530bea8 Merge branch 'master' into NetHack-3.7 2019-11-29 17:01:29 -05:00
nhmall
8cd73c8cc9 Merge branch 'NetHack-3.6' 2019-11-29 16:57:23 -05:00
Pasi Kallinen
f8a1059a87 Read lua files more efficiently
... replacing horribly hacky loop.
2019-11-29 21:49:03 +02:00
PatR
49e4dfbc0f fix teetering typo
do.c:1005:54: warning: address of function 'uescaped_shaft' will always
      evaluate to 'true' [-Wpointer-bool-conversion]
        if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft)) {
                                                  ~~ ^~~~~~~~~~~~~~
2019-11-29 11:38:42 -08:00
nhmall
fd7d0f5d52 more things considered when you're on the brink 2019-11-29 11:14:55 -05:00
nhmall
381b8b4fcb updated sfdata.c 2019-11-28 22:50:28 -05:00
nhmall
8a971a378b put back unintended removal of end of line strip 2019-11-28 20:56:42 -05:00
nhmall
954ffd11d3 updates to extended version info 2019-11-28 20:20:04 -05:00
PatR
adc455129d 3.7: goldX and other stuff
Move option variable goldX (True: treat gold as BUC unknown, False:
treat gold as uncursed during BUCX filtering) from iflags to flags
so that it persists across save/restore.

Get rid of a few obsolete things from struct flags.

Try to make the 'cursesgraphics' option work although I don't think
that it was ever functional enough for anybody to use so probably
could have been removed instead.

Bump EDITLEVEL; any current save files are invalid.

Demote status from Beta to Work-in-Progress.

I modified src/sfdata.c manually (not included here) to get a full
build.  The Unix Makefile.src needs to be taught when and how to
regenerate it.
2019-11-28 15:00:54 -08:00
nhmall
11ec453329 Merge branch 'NetHack-3.7' 2019-11-27 23:07:50 -05:00
nhmall
5847806104 Merge branch 'NetHack-3.6' 2019-11-27 23:07:29 -05:00
nhmall
566019e588 return struct fields borrowed in 3.6
This will break existing 3.7 save/bones.
2019-11-27 20:18:45 -05:00
PatR
7ca572eb60 paranoid_confirmation:eating
Add 'eating' (synonym 'continue') to the list of things that can be
set via paranoid_confirmation to require "yes" instead of "y" when
the user is prompted about something, in this case "Continue eating?".

dat/opthelp was missing a few of the paranoid_confirmation choices.
2019-11-27 16:27:13 -08:00