Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-11-30 23:48:03 -05:00
3 changed files with 44 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.192 $ $NHDT-Date: 1574882658 2019/11/27 19:24:18 $
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.197 $ $NHDT-Date: 1575173931 2019/12/01 04:18:51 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -320,6 +320,8 @@ update window port spec to include a color-availability table that the window
function in src/windows.c which uses a few data checks only and
elminates multiple string function calls for each map cell update
that were being done in some cases previously
taking off a fedora or dented pot (no-delay helmets) left the helmet stuck
and took off hero's suit
unix: fix double DLB definition in linux hints file
windows: fix --showpaths output for the data file which relies on being
constructed programmatically to incorporate the version suffix

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 do_wear.c $NHDT-Date: 1574638390 2019/11/24 23:33:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */
/* NetHack 3.6 do_wear.c $NHDT-Date: 1575173934 2019/12/01 04:18:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.115 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1573,28 +1573,46 @@ int
armoroff(otmp)
struct obj *otmp;
{
register int delay = -objects[otmp->otyp].oc_delay;
static char offdelaybuf[60];
int delay = -objects[otmp->otyp].oc_delay;
const char *what = 0;
if (cursed(otmp))
return 0;
/* this used to make assumptions about which types of armor had
delays and which didn't; now both are handled for all types */
if (delay) {
nomul(delay);
g.multi_reason = "disrobing";
if (is_helmet(otmp)) {
/* ick... */
g.nomovemsg = !strcmp(helm_simple_name(otmp), "hat")
? "You finish taking off your hat."
: "You finish taking off your helmet.";
what = helm_simple_name(otmp);
g.afternmv = Helmet_off;
} else if (is_gloves(otmp)) {
g.nomovemsg = "You finish taking off your gloves.";
what = gloves_simple_name(otmp);
g.afternmv = Gloves_off;
} else if (is_boots(otmp)) {
g.nomovemsg = "You finish taking off your boots.";
what = c_boots;
g.afternmv = Boots_off;
} else {
g.nomovemsg = "You finish taking off your suit.";
} else if (is_suit(otmp)) {
what = suit_simple_name(otmp);
g.afternmv = Armor_off;
} else if (is_cloak(otmp)) {
what = cloak_simple_name(otmp);
g.afternmv = Cloak_off;
} else if (is_shield(otmp)) {
what = c_shield;
g.afternmv = Shield_off;
} else if (is_shirt(otmp)) {
what = c_shirt;
g.afternmv = Shirt_off;
} else {
impossible("Taking off unknown armor (%d: %d), delay %d",
otmp->otyp, objects[otmp->otyp].oc_armcat, delay);
}
if (what) {
Sprintf(offdelaybuf, "You finish taking off your %s.", what);
nomovemsg = offdelaybuf;
}
} else {
/* Be warned! We want off_msg after removing the item to
@@ -1618,8 +1636,19 @@ struct obj *otmp;
(void) Cloak_off();
else if (is_shield(otmp))
(void) Shield_off();
else
else if (is_helmet(otmp))
(void) Helmet_off();
else if (is_gloves(otmp))
(void) Gloves_off();
else if (is_boots(otmp))
(void) Boots_off();
else if (is_shirt(otmp))
(void) Shirt_off();
else if (is_suit(otmp))
(void) Armor_off();
else
impossible("Taking off unknown armor (%d: %d), no delay",
otmp->otyp, objects[otmp->otyp].oc_armcat);
off_msg(otmp);
}
g.context.takeoff.mask = g.context.takeoff.what = 0L;

View File

@@ -227,6 +227,7 @@ register int col, row;
}
}
#if 0
int
has_color(int color)
{
@@ -237,6 +238,7 @@ has_color(int color)
return 0;
#endif
}
#endif
void
home()