look at what is here; if there are many objects (pile_limit or more), don't show them unless obj_cnt is 0 */
| 4101 | /* look at what is here; if there are many objects (pile_limit or more), |
| 4102 | don't show them unless obj_cnt is 0 */ |
| 4103 | int |
| 4104 | look_here( |
| 4105 | int obj_cnt, /* obj_cnt > 0 implies that autopickup is in progress */ |
| 4106 | unsigned lookhere_flags) |
| 4107 | { |
| 4108 | struct obj *otmp; |
| 4109 | struct trap *trap; |
| 4110 | const char *verb = Blind ? "feel" : "see"; |
| 4111 | const char *dfeature = (char *) 0; |
| 4112 | char fbuf[BUFSZ], fbuf2[BUFSZ]; |
| 4113 | winid tmpwin; |
| 4114 | boolean skip_objects, felt_cockatrice = FALSE, |
| 4115 | picked_some = (lookhere_flags & LOOKHERE_PICKED_SOME) != 0, |
| 4116 | /* skip 'dfeature' if caller used describe_decor() to show it */ |
| 4117 | skip_dfeature = (lookhere_flags & LOOKHERE_SKIP_DFEATURE) != 0; |
| 4118 | |
| 4119 | /* default pile_limit is 5; a value of 0 means "never skip" |
| 4120 | (and 1 effectively forces "always skip") */ |
| 4121 | skip_objects = (flags.pile_limit > 0 && obj_cnt >= flags.pile_limit); |
| 4122 | if (u.uswallow) { |
| 4123 | struct monst *mtmp = u.ustuck; |
| 4124 | |
| 4125 | /* |
| 4126 | * FIXME? |
| 4127 | * Engulfer's inventory can include worn items (specific case is |
| 4128 | * Juiblex being created with an amulet as random defensive item) |
| 4129 | * which will be flagged as "(being worn)". This code includes |
| 4130 | * such a worn item under the header "Contents of <mon>'s stomach", |
| 4131 | * a nifty trick for how/where to wear stuff. The situation is |
| 4132 | * rare enough to turn a blind eye. |
| 4133 | * |
| 4134 | * 3.6.3: Pickup has been changed to decline to pick up a worn |
| 4135 | * item from inside an engulfer, but if player tries, it just |
| 4136 | * says "you can't" without giving a reason why (which would be |
| 4137 | * something along the lines of "because it's worn on the outside |
| 4138 | * so is unreachable from in here..."). |
| 4139 | */ |
| 4140 | Sprintf(fbuf, "Contents of %s %s", s_suffix(mon_nam(mtmp)), |
| 4141 | mbodypart(mtmp, STOMACH)); |
| 4142 | /* Skip "Contents of " by using fbuf index 12 */ |
| 4143 | You("%s to %s what is lying in %s.", Blind ? "try" : "look around", |
| 4144 | verb, &fbuf[12]); |
| 4145 | otmp = mtmp->minvent; |
| 4146 | if (otmp) { |
| 4147 | for (; otmp; otmp = otmp->nobj) { |
| 4148 | /* If swallower is an animal, it should have become stone |
| 4149 | * but... */ |
| 4150 | if (otmp->otyp == CORPSE) |
| 4151 | feel_cockatrice(otmp, FALSE); |
| 4152 | } |
| 4153 | if (Blind) |
| 4154 | Strcpy(fbuf, "You feel"); |
| 4155 | Strcat(fbuf, ":"); |
| 4156 | (void) display_minventory(mtmp, MINV_ALL | PICK_NONE, fbuf); |
| 4157 | } else { |
| 4158 | You("%s no objects here.", verb); |
| 4159 | } |
| 4160 | return (!!Blind ? ECMD_TIME : ECMD_OK); |
no test coverage detected