MCPcopy Create free account
hub / github.com/NetHack/NetHack / hidden_gold

Function hidden_gold

src/vault.c:1256–1268  ·  view source on GitHub ↗

* amount of gold in carried containers * * even_if_unknown: * True: all gold * False: limit to known contents */

Source from the content-addressed store, hash-verified

1254 * False: limit to known contents
1255 */
1256long
1257hidden_gold(boolean even_if_unknown)
1258{
1259 long value = 0L;
1260 struct obj *obj;
1261
1262 for (obj = gi.invent; obj; obj = obj->nobj)
1263 if (Has_contents(obj) && (obj->cknown || even_if_unknown))
1264 value += contained_gold(obj, even_if_unknown);
1265 /* unknown gold stuck inside statues may cause some consternation... */
1266
1267 return value;
1268}
1269
1270/* prevent "You hear footsteps.." when inappropriate */
1271boolean

Callers 13

really_doneFunction · 0.85
gold_detectFunction · 0.85
writexlentryFunction · 0.85
doprgoldFunction · 0.85
uleftvaultFunction · 0.85
invaultFunction · 0.85
gd_moveFunction · 0.85
u_init_inventory_attrsFunction · 0.85
ghitmFunction · 0.85
botl_scoreFunction · 0.85
basics_enlightenmentFunction · 0.85
dopayFunction · 0.85

Calls 1

contained_goldFunction · 0.85

Tested by

no test coverage detected