MCPcopy Index your code
hub / github.com/NetHack/NetHack / bury_objs

Function bury_objs

src/dig.c:2049–2081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047}
2048
2049void
2050bury_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() */

Callers 7

boulder_hits_poolFunction · 0.85
flooreffectsFunction · 0.85
moverock_coreFunction · 0.85
bury_objFunction · 0.85
wiz_debug_cmd_buryFunction · 0.85
dospinwebFunction · 0.85
zap_over_floorFunction · 0.85

Calls 11

shop_keeperFunction · 0.85
in_roomsFunction · 0.85
costly_spotFunction · 0.85
stolen_valueFunction · 0.85
bury_an_objFunction · 0.85
del_engr_atFunction · 0.85
newsymFunction · 0.85
maybe_unhide_atFunction · 0.85
YouFunction · 0.85
shknameFunction · 0.85
currencyFunction · 0.85

Tested by

no test coverage detected