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

Function do_reset_eat

src/eat.c:421–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421staticfn void
422do_reset_eat(void)
423{
424 debugpline0("do_reset_eat...");
425 if (svc.context.victual.piece) {
426 struct obj *otmp;
427
428 svc.context.victual.o_id = 0;
429 otmp = touchfood(svc.context.victual.piece);
430 svc.context.victual.piece = otmp;
431 if (otmp) {
432 svc.context.victual.o_id = otmp->o_id;
433 recalc_wt();
434 }
435 }
436 svc.context.victual.fullwarn
437 = svc.context.victual.eating
438 = svc.context.victual.doreset
439 = 0;
440 /* Do not set canchoke to FALSE; if we continue eating the same object
441 * we need to know if canchoke was set when they started eating it the
442 * previous time. And if we don't continue eating the same object
443 * canchoke always gets recalculated anyway.
444 */
445 stop_occupation();
446 newuhs(FALSE);
447}
448
449/* if 'prop' is only set because of a timed value (so not an intrinsic
450 attribute or because of polymorph shape or worn or carried gear), return

Callers 3

eatfoodFunction · 0.85
doeatFunction · 0.85
biteFunction · 0.85

Calls 4

touchfoodFunction · 0.85
recalc_wtFunction · 0.85
stop_occupationFunction · 0.85
newuhsFunction · 0.85

Tested by

no test coverage detected