look at the objects at our location, unless there are too many of them */
| 427 | |
| 428 | /* look at the objects at our location, unless there are too many of them */ |
| 429 | staticfn void |
| 430 | check_here(boolean picked_some) |
| 431 | { |
| 432 | struct obj *obj; |
| 433 | int ct = 0; |
| 434 | unsigned lhflags = picked_some ? LOOKHERE_PICKED_SOME : LOOKHERE_NOFLAGS; |
| 435 | |
| 436 | if (flags.mention_decor) { |
| 437 | if (describe_decor()) |
| 438 | lhflags |= LOOKHERE_SKIP_DFEATURE; |
| 439 | } |
| 440 | |
| 441 | /* count the objects here */ |
| 442 | for (obj = svl.level.objects[u.ux][u.uy]; obj; obj = obj->nexthere) { |
| 443 | if (obj != uchain) |
| 444 | ct++; |
| 445 | } |
| 446 | |
| 447 | /* If there are objects here, take a look. */ |
| 448 | if (ct) { |
| 449 | if (svc.context.run) |
| 450 | nomul(0); |
| 451 | flush_screen(1); |
| 452 | (void) look_here(ct, lhflags); |
| 453 | } else { |
| 454 | read_engr_at(u.ux, u.uy); |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | /* query_objlist callback: return TRUE if obj's count is >= reference value */ |
| 459 | staticfn boolean |
no test coverage detected