health food store

When a food shop gets converted into a health food shop (minetown
when playing as a monk), the shop type and underlying room type
weren't changed to match.
This commit is contained in:
PatR
2020-04-16 01:00:31 -07:00
parent 43d331c4eb
commit c09733f2e4
2 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.179 $ $NHDT-Date: 1586807928 2020/04/13 19:58:48 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.183 $ $NHDT-Date: 1587024026 2020/04/16 08:00:26 $
General Fixes and Modified Features
-----------------------------------
@@ -136,6 +136,7 @@ male hero poly'd into nymph chooses charm vs seduce message based on being
hostile monsters with launcher and ammo try to stay away from melee range
allow displacing peaceful creatures
unicorn horns don't restore attribute loss anymore
when a shop is changed from food to health food, change room type to match
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 shknam.c $NHDT-Date: 1586375496 2020/04/08 19:51:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.52 $ */
/* NetHack 3.6 shknam.c $NHDT-Date: 1587024023 2020/04/16 08:00:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.54 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -502,10 +502,11 @@ const char *const *nlp;
&& (sptr = Is_special(&u.uz)) != 0 && sptr->flags.town) {
/* special-case override for minetown food store for monks */
nlp = shkhealthfoods;
ESHK(shk)->shoptype = FODDERSHOP;
}
if (nlp == shklight && In_mines(&u.uz) && (sptr = Is_special(&u.uz)) != 0
&& sptr->flags.town) {
if (nlp == shklight && In_mines(&u.uz)
&& (sptr = Is_special(&u.uz)) != 0 && sptr->flags.town) {
/* special-case minetown lighting shk */
shname = "+Izchak";
shk->female = FALSE;
@@ -675,6 +676,8 @@ struct mkroom *sroom;
if (shp->shknms == shkrings)
(void) mongets(shk, TOUCHSTONE);
nameshk(shk, shp->shknms);
/* might have changed delicatessen to health food store */
sroom->rtype = eshkp->shoptype;
return sh;
}