might trigger an impossible about being positioned too far from hero
don't try to catch up for lost time for shop damage repair in restdamage()
called from getlev(); let normal shopkeeper movement take care of it
+shop wall repair that was delayed because the hero or a monster was an
+ obstacle in the gap at repair time might not be displayed as wall
+ once the obstacle moved and the repair eventually took place
putting objects into a container with menustyle=traditional and then taking
them back out with #tip would result in complaints about obj bypass
bit being set if sanity_check was On
}
static void
-litter_scatter(xchar *litter, int k, xchar x, xchar y, struct monst *shkp)
+litter_scatter(
+ xchar *litter,
+ int k,
+ xchar x, xchar y,
+ struct monst *shkp)
{
struct obj *otmp;
struct obj *otmp;
struct trap *ttmp;
int k, disposition = 1;
- boolean stop_picking = FALSE;
+ boolean seeit, stop_picking = FALSE;
if (!repairable_damage(tmp_dam, shkp))
return 0;
- catchup = g.moves > tmp_dam->when + REPAIR_DELAY;
x = tmp_dam->place.x;
y = tmp_dam->place.y;
+ seeit = cansee(x, y);
ttmp = t_at(x, y);
-
if (ttmp) {
switch (ttmp->ttyp) {
case LANDMINE:
break;
}
deltrap(ttmp);
- if (cansee(x, y))
+ if (seeit)
newsym(x, y);
if (!catchup)
disposition = 3;
litter = litter_getpos(&k, x, y, shkp);
litter_scatter(litter, k, x, y, shkp);
+ /* needed if hero has line-of-sight to the former gap from outside
+ the shop but is farther than one step away; once the light inside
+ the shop is blocked, the other newsym() below won't redraw the
+ spot showing its repaired wall */
+ if (seeit)
+ newsym(x, y);
+ block_point(x, y);
+
if (catchup)
return 1; /* repair occurred while off level so no messages */
- block_point(x, y);
- if (cansee(x, y)) {
+ if (seeit) {
if (IS_WALL(tmp_dam->typ)) {
/* player sees actual repair process, so KNOWS it's a wall */
levl[x][y].seenv = SVALL;