| 2047 | } |
| 2048 | |
| 2049 | void |
| 2050 | bury_objs(int x, int y) |
| 2051 | { |
| 2052 | struct obj *otmp, *otmp2; |
| 2053 | struct monst *shkp; |
| 2054 | long loss = 0L; |
| 2055 | boolean costly; |
| 2056 | |
| 2057 | costly = ((shkp = shop_keeper(*in_rooms(x, y, SHOPBASE))) |
| 2058 | && costly_spot(x, y)); |
| 2059 | |
| 2060 | if (svl.level.objects[x][y] != (struct obj *) 0) { |
| 2061 | debugpline2("bury_objs: at <%d,%d>", x, y); |
| 2062 | } |
| 2063 | for (otmp = svl.level.objects[x][y]; otmp; otmp = otmp2) { |
| 2064 | if (costly && !svc.context.mon_moving) { |
| 2065 | loss += stolen_value(otmp, x, y, (boolean) shkp->mpeaceful, TRUE); |
| 2066 | if (otmp->oclass != COIN_CLASS) |
| 2067 | otmp->no_charge = 1; |
| 2068 | } |
| 2069 | otmp2 = bury_an_obj(otmp, (boolean *) 0); |
| 2070 | } |
| 2071 | |
| 2072 | /* don't expect any engravings here, but just in case */ |
| 2073 | del_engr_at(x, y); |
| 2074 | newsym(x, y); |
| 2075 | maybe_unhide_at(x, y); |
| 2076 | |
| 2077 | if (costly && loss) { |
| 2078 | You("owe %s %ld %s for burying merchandise.", shkname(shkp), loss, |
| 2079 | currency(loss)); |
| 2080 | } |
| 2081 | } |
| 2082 | |
| 2083 | /* move objects from buriedobjlist to fobj/nexthere lists; if caller |
| 2084 | converts terrain from ice to something, it should call obj_ice_effects() */ |
no test coverage detected