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

Function furniture_handled

src/dig.c:570–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570staticfn boolean
571furniture_handled(coordxy x, coordxy y, boolean madeby_u)
572{
573 struct rm *lev = &levl[x][y];
574
575 if (IS_FOUNTAIN(lev->typ)) {
576 dogushforth(FALSE);
577 SET_FOUNTAIN_WARNED(x, y); /* force dryup */
578 dryup(x, y, madeby_u);
579 } else if (IS_SINK(lev->typ)) {
580 breaksink(x, y);
581 } else if (lev->typ == DRAWBRIDGE_DOWN
582 || (is_drawbridge_wall(x, y) >= 0)) {
583 coordxy bx = x, by = y;
584
585 /* if under the portcullis, the bridge is adjacent */
586 (void) find_drawbridge(&bx, &by);
587 destroy_drawbridge(bx, by);
588 } else {
589 return FALSE;
590 }
591 return TRUE;
592}
593
594
595/* When will hole be finished? Very rough indication used by shopkeeper. */

Callers 2

digactualholeFunction · 0.85
digholeFunction · 0.85

Calls 6

dogushforthFunction · 0.85
dryupFunction · 0.85
breaksinkFunction · 0.85
is_drawbridge_wallFunction · 0.85
find_drawbridgeFunction · 0.85
destroy_drawbridgeFunction · 0.85

Tested by

no test coverage detected