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

Function goodfruit

src/bones.c:41–48  ·  view source on GitHub ↗

Call this function for each fruit object saved in the bones level: it marks * that particular type of fruit as existing (the marker is that that type's * ID is positive instead of negative). This way, when we later save the * chain of fruit types, we know to only save the types that exist. */

Source from the content-addressed store, hash-verified

39 * chain of fruit types, we know to only save the types that exist.
40 */
41staticfn void
42goodfruit(int id)
43{
44 struct fruit *f = fruit_from_indx(-id);
45
46 if (f)
47 f->fid = id;
48}
49
50staticfn void
51resetobjs(struct obj *ochain, boolean restore)

Callers 2

resetobjsFunction · 0.85
drop_upon_deathFunction · 0.85

Calls 1

fruit_from_indxFunction · 0.85

Tested by

no test coverage detected