move objects from buriedobjlist to fobj/nexthere lists; if caller converts terrain from ice to something, it should call obj_ice_effects() */
| 2083 | /* move objects from buriedobjlist to fobj/nexthere lists; if caller |
| 2084 | converts terrain from ice to something, it should call obj_ice_effects() */ |
| 2085 | void |
| 2086 | unearth_objs(int x, int y) |
| 2087 | { |
| 2088 | struct obj *otmp, *otmp2, *bball; |
| 2089 | coord cc; |
| 2090 | |
| 2091 | debugpline2("unearth_objs: at <%d,%d>", x, y); |
| 2092 | cc.x = x; |
| 2093 | cc.y = y; |
| 2094 | bball = buried_ball(&cc); |
| 2095 | for (otmp = svl.level.buriedobjlist; otmp; otmp = otmp2) { |
| 2096 | otmp2 = otmp->nobj; |
| 2097 | if (otmp->ox == x && otmp->oy == y) { |
| 2098 | if (bball && otmp == bball |
| 2099 | && u.utrap && u.utraptype == TT_BURIEDBALL) { |
| 2100 | buried_ball_to_punishment(); |
| 2101 | } else { |
| 2102 | obj_extract_self(otmp); |
| 2103 | if (otmp->timed) |
| 2104 | (void) stop_timer(ROT_ORGANIC, obj_to_any(otmp)); |
| 2105 | place_object(otmp, x, y); |
| 2106 | stackobj(otmp); |
| 2107 | } |
| 2108 | } |
| 2109 | } |
| 2110 | del_engr_at(x, y); |
| 2111 | newsym(x, y); |
| 2112 | } |
| 2113 | |
| 2114 | /* |
| 2115 | * The organic material has rotted away while buried. As an expansion, |
no test coverage detected