From: Pasi Kallinen Date: Mon, 11 Apr 2022 12:08:50 +0000 (+0300) Subject: Add moving on the trap to the mouse menu X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28e416da3a6a3820fa783110ee75c72962bb03d0;p=nethack Add moving on the trap to the mouse menu --- diff --git a/src/cmd.c b/src/cmd.c index 75593ef71..e5edf7895 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -4492,6 +4492,7 @@ enum menucmd { MCMD_SEARCH, MCMD_LOOK_TRAP, MCMD_UNTRAP_TRAP, + MCMD_MOVE_DIR, MCMD_RIDE, MCMD_REMOVE_SADDLE, MCMD_APPLY_SADDLE, @@ -4665,7 +4666,7 @@ there_cmd_menu_next2u(winid win, int x, int y, int mod, int *act) if (ttmp->ttyp != VIBRATING_SQUARE) mcmd_addmenu(win, MCMD_UNTRAP_TRAP, "Attempt to disarm trap"), ++K; - /* TODO: "Step on the " */ + mcmd_addmenu(win, MCMD_MOVE_DIR, "Move on the trap"), ++K; } mtmp = m_at(x, y); @@ -4843,6 +4844,9 @@ there_cmd_menu(int x, int y, int mod) cmdq_add_ec(dountrap); cmdq_add_dir(dx, dy, 0); break; + case MCMD_MOVE_DIR: + cmdq_add_ec(move_funcs[xytod(dx, dy)][MV_WALK]); + break; case MCMD_RIDE: cmdq_add_ec(doride); cmdq_add_dir(dx, dy, 0);