Commit Graph

6469 Commits

Author SHA1 Message Date
PatR
25bcbe3846 fix github pull request #418 - towel wetness
Fire damage would dry out a wet towel but never all the way to 0.
Water damage would wet a towel but if it was already wet, its
wetness might decrease.

This uses the pull request's change for increasing the wetness
but changes dry_a_towel so that the original code for decreasing
that will work as is.  Using wet_a_towel() to set wetness to 0
doesn't make much sense, so still won't do so; dry_a_towel() does
and now will.

This also adds missing perm_invent update for towels in inventory
changing wetness.

Fixes #418
2020-12-12 12:04:20 -08:00
PatR
8d65d6dbf0 fix #H3134 - selling container for credit
If a container holds anything that a shop wouldn't ordinarily
buy and sell and you sell it for gold, the 'foreign' contents
are marked no_charge and hero still owns them.  But selling the
same container+contents for credit instead of gold would take
shop possession of all the contents without increasing the
credit amount.

The fixes entry is longer than the fix.  It solves cited case but
I won't be surprised much if it messes up some other case(s).
2020-12-11 22:32:38 -08:00
PatR
0d0900b3a4 dowhatis formatting for Qt
The '/' command's variants /o, /O, /m, and /M use spaces to
align output in columns and that looks quite bad if rendered in
a proportional font.  Qt normally uses proportional font for
text windows but it watches the supplied lines for any with four
consecutive spaces and forces fixed-width font if it sees any.
So changing the existing separator line from "" to "    " makes
Qt format the dowhatis data as intended.
2020-12-11 17:15:21 -08:00
PatR
51e967ee42 warning suppression - unused static routine 2020-12-11 17:01:43 -08:00
nhmall
6dc033e5d8 don't miss the special furniture checks during liquid flow
Closes #405
2020-12-11 16:28:59 -05:00
Pasi Kallinen
ea93c17fa7 Monsters can revive corpses on floor with undead turning
... but only if the corpse is in direct line from the monster to hero
2020-12-11 19:49:25 +02:00
PatR
e2680bfc4a add the hardcoded menu control keys to key help
'? k' shows menu controls in a fancy layout and '? i' lists the
same things in basic layout but both only showed the keys that
can be changed via option settings.  Add <return>, <space>, and
<escape> so that all relevant keys are listed together whether
re-bindable or not.  The description of <space> is accurate for
tty and curses but possibly not for other interfaces.

This also reorders how the controls are listed, moving next page
and previous page before first page and last page, and placing
invert between select and deselect rather than after both.
2020-12-11 05:10:43 -08:00
PatR
fd5ef1ecaa more key bindings
number_pad==1 adds
 '5' => 'G'
 M-5 => 'g'
 '0' => 'i'
number_pad==2 swaps 5 and M-5 and adds M-0
 '5' => 'g'
 M-5 => 'G'
 '0' => 'i'
 M-0 => 'I'

M-5 and M-0 were missing from the bound key handling; they still
used hardcoded digits even though the actions for plain 5 and
plain 0 can be bound to other keys these days.  This implements
the M-5 variation as NHKF_RUSH2.  Changing numpad from 1 to 2
or vice versa will swap the NHKF_RUN2 and NHKF_RUSH2 actions
regardless of what keys they're assigned to.  I haven't done
anything for unimplemented NHKF_DOINV2 though (and am not
planning to in case someone else wants to jump in...).

This also fixes the description of the 'I' command.  The extended
command name for that still misleadingly refers to "type" rather
than "class" though.
2020-12-10 15:06:26 -08:00
Pasi Kallinen
eb1fb93d06 Mark unused parameters 2020-12-10 22:08:32 +02:00
Pasi Kallinen
f936cd9887 Remove unused variables 2020-12-10 19:04:31 +02:00
Pasi Kallinen
fd665a180a Unify trap selector 2020-12-10 19:04:31 +02:00
Pasi Kallinen
e6142f1149 Unify vibrating square 2020-12-10 19:04:31 +02:00
Pasi Kallinen
d537ceb2c4 Unify magic portals 2020-12-10 19:04:31 +02:00
Pasi Kallinen
31a7f2b4d8 Remove unused label 2020-12-10 19:04:31 +02:00
Pasi Kallinen
5dbcc125f5 Unify rolling boulder traps 2020-12-10 19:04:30 +02:00
Pasi Kallinen
97a9bcf9c5 Unify landmines 2020-12-10 19:04:30 +02:00
Pasi Kallinen
5dcd6b2e17 Unify polymorph traps 2020-12-10 19:04:30 +02:00
Pasi Kallinen
6eb89c6b44 Unify anti magic traps 2020-12-10 19:04:30 +02:00
Pasi Kallinen
ed3a736bd8 Unify fire traps 2020-12-10 19:04:30 +02:00
Pasi Kallinen
c15d062502 Unify statue traps 2020-12-10 19:04:30 +02:00
Pasi Kallinen
eb58352860 Unify webs 2020-12-10 19:04:30 +02:00
Pasi Kallinen
3bd60d6d54 Unify holes, level teleport and teleport traps 2020-12-10 19:04:30 +02:00
Pasi Kallinen
afa1fef1ff Unify pits 2020-12-10 19:04:30 +02:00
Pasi Kallinen
5773f49dfe Unify fire trap 2020-12-10 19:04:30 +02:00
Pasi Kallinen
c78e873c7c Unify rust trap 2020-12-10 19:04:30 +02:00
Pasi Kallinen
4974a57832 Unify sleeping gas trap 2020-12-10 19:04:30 +02:00
Pasi Kallinen
0a47c3d4f2 Unify bear trap 2020-12-10 19:04:29 +02:00
Pasi Kallinen
e07968e8e5 Unify squeaky board 2020-12-10 19:04:29 +02:00
Pasi Kallinen
a1227cefb3 Unify rocktrap 2020-12-10 19:04:29 +02:00
Pasi Kallinen
485985968e Unify dart trap 2020-12-10 19:04:29 +02:00
Pasi Kallinen
640be5ff7e Unify arrow trap 2020-12-10 19:04:29 +02:00
Pasi Kallinen
b5cfd8333f Split trap effects out of dotrap 2020-12-10 19:04:29 +02:00
PatR
3e183d0c6a yet more key bindings - lack of same...
When ?i shows key bindings, at the end of each group (movement,
prefixes, general, game, debug) report any commands for that
group which don't have any key assigned.  Movement and prefixes
all have keys; they'd be pretty useless without and key bindings
won't override movement commands. For general, the "keyless" are
|#exploremode
|#herecmdmenu
|#therecmdmenu
after this adds the relevant flag to their command definitions;
for game, "#terrain" is the only one; the debug section has 20.

There is a known problem that I've going to pretend that I didn't
notice:  if I use BIND=D:takeoffall then 'A' becomes unassigned,
'D' invokes #takeoffall, "#droptype" becomes keyless, and ?i
reports those correctly.  But if I use BIND=M:takeoffall, 'A'
becomes unassigned, 'M' continues to be its usual prefix, and
the "#takeoffall" command is nowhere to be seen.  The code that
tracks assignments is letting that case fall through the cracks.
'M' ends up assigned to both and the ?i code deliberately only
shows the first.
2020-12-10 01:07:07 -08:00
PatR
e1406a8c08 txt2key() - parsing key binding specifications
While testing some addtional ?i (list of key assignments)
changes, I wanted to give every key a binding.  When I tried
BIND=M-^A:exploremode
the text to key conversion didn't like that.  This adds support
for M-^x and M-C-x plus variations where dashes are omitted.

This adds support for ^? even though that isn't really a
control character.  I bound #terrain to it and surprising--to
me at least--the <delete> key worked to invoke that command.

Also changes 'char txt2key(...)' to be 'uchar txt2key(...)'.
2020-12-09 16:52:54 -08:00
PatR
1bec4a66cd keylist help (? i) fixes
I was implementing a routine to show all the key bindings
when I discovered that we already have one.  This fixes a few
small problems:  'n' prefix for number entry was missing for
number_pad mode.  Meta+<direction> for running in number_pad
mode was missing too.  ^A was present but being suppressed by
lack of #define for obsolete #if REDO.  And ^C was shown as ^c
while all other ^ characters appear in upper case.  Once ^A
appeared as the line before it, the inconsistency stood out.

I also changed the slightly verbose "Shift-<direction>" and
"Ctrl-<direction>" entries below the direction grid to use plus
instead of minus signs.  Plus emphasizes that two things are
combined so seems more intuitive.  (I left "M-c" alone.)
2020-12-08 15:58:02 -08:00
Pasi Kallinen
2a181c3955 Detection map redisplay routine code deduplication 2020-12-08 17:08:57 +02:00
k21971
3d7a3fcc72 Fix: genetic engineers dropping Schroedinger's cat box.
Only quantum mechanics are supposed to have a chance of death-dropping the
Schroedinger's cat box.

Slash'Em already had this but it was missed when Genetic engineers were ported
over.
2020-12-07 22:42:24 +01:00
PatR
87818188e1 fix #3120,#3122 - dwarf pass_wall without digging
I couldn't reproduce this so can't confirm that this fix works,
but inspection of the code reveals that something was missing
in the unified mon movement flags code.  I think what has been
happening is that a dwarf without a pick-axe might not bother
wielding that but movement behaved as if it had, then digging
decided it wasn't.
2020-12-07 12:46:46 -08:00
PatR
76b1b0f256 extended command help
The two or three (wizard mode) menu choices at the start of
the '# ?' help menu look enough like headers that it can be
confusing.  They're asking about changing the view of commands
to what those entries describe, but if considered as headers
they're describing the opposite of what is currently displayed.
Make them more verbose to try to clarify the situation.

This also moves the 'm' flag in front of the 'A' in the middle
column (of name, flag(s), description) when they both apply.
2020-12-07 03:08:32 -08:00
Pasi Kallinen
13359648dd Remove duplicate wallify_map code 2020-12-06 18:36:37 +02:00
Pasi Kallinen
452dc3da26 Unify spitmu and spitmm 2020-12-06 13:57:50 +02:00
Patric Mueller
1d8503a912 Typo in impossible message in spitmm 2020-12-06 00:27:56 +01:00
PatR
9e33d658a4 conflicting 'bullets'
This was pointed out several years ago.  Since tho different
'static bullets[]' contain different values, give them distinct
names.
2020-12-05 12:32:52 -08:00
PatR
edefa14834 readable conical hats
Let tourists read cornuthaum ("WIZZARD") and dunce cap ("DUNCE").
One out of three will have those words, the other two will yield
"you can't find anything to read on this ___" where ___ is either
"conical hat" or "cornuthaum" or "dunce cap" depending upon hat
type and discovery status.

Even when a dunce cap says "DUNCE" it won't become discovered,
just offer the player an opportunity to apply a name.

Other roles still fall through to the "That's a silly thing to
read" feedback.

Not intended to be logical...
2020-12-05 12:29:38 -08:00
Pasi Kallinen
44920d4650 Remove duplicate lines 2020-12-05 19:00:19 +02:00
Pasi Kallinen
55b4946305 Fix AD_DCAY mhitm armor erosion type 2020-12-04 19:05:24 +02:00
PatR
0ba4184206 couple more command tweaks
Rename "seegold" to "showgold".  The character to invoke it ('$')
is similar to those for the various "seeXYZ" commands ('[','=',&c)
but unlike them, it isn't part of "seeall" ('*').

Expand or replace the one-line description of several commands
(shell, showgold, showtrap, suspend, versionshort).
2020-12-04 02:58:03 -08:00
PatR
6056799e22 XhitX unification - unused function parameters 2020-12-04 02:11:53 -08:00
Pasi Kallinen
1f6a7a5eef Init the done variable to false 2020-12-04 09:30:22 +02:00
Pasi Kallinen
4fb370ee79 Remove unused variables 2020-12-04 09:30:21 +02:00