From 43e22a13891ed384c354725b0233d3fe96b85a1c Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 31 Oct 2006 05:32:07 +0000 Subject: [PATCH] shop bits Eliminate a couple of minor redundancies; no change in game play. dropy() - only check about selling object if there is a shop on the level. pick_obj() - leave it to addinv() clear object's no_charge bit. --- src/do.c | 2 +- src/pickup.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/do.c b/src/do.c index de8380b17..3e209ec55 100644 --- a/src/do.c +++ b/src/do.c @@ -573,7 +573,7 @@ register struct obj *obj; place_object(obj, u.ux, u.uy); if (obj == uball) drop_ball(u.ux,u.uy); - else + else if (level.flags.has_shop) sellobj(obj, u.ux, u.uy); stackobj(obj); if(Blind && Levitation) diff --git a/src/pickup.c b/src/pickup.c index ae989a2ee..bb72fbb99 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1390,8 +1390,6 @@ struct obj *otmp; if (!index(u.ushops, *fakeshop)) remote_burglary(otmp->ox, otmp->oy); } - if (otmp->no_charge) /* only applies to objects outside invent */ - otmp->no_charge = 0; newsym(otmp->ox, otmp->oy); return addinv(otmp); /* might merge it with other objects */ } -- 2.50.1