From c09733f2e4c45ac42d4414d2948bde8ffb8589d8 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 16 Apr 2020 01:00:31 -0700 Subject: [PATCH] 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. --- doc/fixes37.0 | 3 ++- src/shknam.c | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 29028cf5a..dccbbf544 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 diff --git a/src/shknam.c b/src/shknam.c index 0d61a95d1..e08cdef50 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -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; }