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

Function make_grave

src/engrave.c:1686–1703  ·  view source on GitHub ↗

Create a headstone at the given location. * The caller is responsible for newsym(x, y). */

Source from the content-addressed store, hash-verified

1684 * The caller is responsible for newsym(x, y).
1685 */
1686void
1687make_grave(coordxy x, coordxy y, const char *str)
1688{
1689 char buf[BUFSZ];
1690
1691 /* Can we put a grave here? */
1692 if ((levl[x][y].typ != ROOM && levl[x][y].typ != GRAVE) || t_at(x, y))
1693 return;
1694 /* Make the grave */
1695 if (!set_levltyp(x, y, GRAVE))
1696 return;
1697 /* Engrave the headstone */
1698 del_engr_at(x, y);
1699 if (!str)
1700 str = get_rnd_text(EPITAPHFILE, buf, rn2, MD_PAD_RUMORS);
1701 make_engr_at(x, y, str, NULL, 0L, HEADSTONE);
1702 return;
1703}
1704
1705/* called when kicking or engraving on a grave's headstone */
1706void

Callers 7

fill_zooFunction · 0.85
really_doneFunction · 0.85
polymorph_sinkFunction · 0.85
wizterrainwishFunction · 0.85
paygdFunction · 0.85
mkgraveFunction · 0.85
lspo_graveFunction · 0.85

Calls 5

t_atFunction · 0.85
set_levltypFunction · 0.85
del_engr_atFunction · 0.85
get_rnd_textFunction · 0.85
make_engr_atFunction · 0.85

Tested by

no test coverage detected