MCPcopy Index your code
hub / github.com/NetHack/NetHack / there_cmd_menu_far

Function there_cmd_menu_far

src/cmd.c:4623–4636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4621}
4622
4623staticfn int
4624there_cmd_menu_far(winid win, coordxy x, coordxy y, int mod)
4625{
4626 int K = 0;
4627
4628 if (mod == CLICK_1) {
4629 if (linedup(u.ux, u.uy, x, y, 1)
4630 && dist2(u.ux, u.uy, x, y) < 18*18)
4631 mcmd_addmenu(win, MCMD_THROW_OBJ, "Throw something"), ++K;
4632
4633 mcmd_addmenu(win, MCMD_TRAVEL, "Travel here"), ++K;
4634 }
4635 return K;
4636}
4637
4638staticfn int
4639there_cmd_menu_common(

Callers 1

there_cmd_menuFunction · 0.85

Calls 3

linedupFunction · 0.85
dist2Function · 0.85
mcmd_addmenuFunction · 0.85

Tested by

no test coverage detected