Change special keys into extended commands
Changes most of the special keys used in the main input loop into extended commands: - movement keys are now bound to extended commands, eg. #movewest and so on. - m-prefix is now #reqmenu extended command, still bound to the 'm' key. - run, rush, and fight are now extended commands, still bound to the same keys as previously. - nopickup and runnopickup keys are removed. Nopickup was using 'm' key, the same as the m-prefix, so allow #reqmenu to modify movement commands to disable pickup. - multiple prefix commands are allowed. This lets user to use #reqmenu, followed by #run, followed by movement to simulate runnopickup behaviour. (If necessary, adding runnopickup back as an extended command would be easy)
This commit is contained in:
5
src/do.c
5
src/do.c
@@ -1120,6 +1120,8 @@ dodown(void)
|
||||
if (trap && Is_stronghold(&u.uz)) {
|
||||
goto_hell(FALSE, TRUE);
|
||||
} else {
|
||||
if (!trap)
|
||||
u.dz = 1;
|
||||
g.at_ladder = (boolean) (levl[u.ux][u.uy].typ == LADDER);
|
||||
next_level(!trap);
|
||||
g.at_ladder = FALSE;
|
||||
@@ -1173,6 +1175,7 @@ doup(void)
|
||||
return ECMD_OK;
|
||||
}
|
||||
g.at_ladder = (boolean) (levl[u.ux][u.uy].typ == LADDER);
|
||||
u.dz = -1;
|
||||
prev_level(TRUE);
|
||||
g.at_ladder = FALSE;
|
||||
return ECMD_TIME;
|
||||
@@ -2046,7 +2049,7 @@ cmd_safety_prevention(const char *cmddesc, const char *act, int *flagcounter)
|
||||
buf[0] = '\0';
|
||||
if (iflags.cmdassist || !(*flagcounter)++)
|
||||
Sprintf(buf, " Use '%s' prefix to force %s.",
|
||||
visctrl(g.Cmd.spkeys[NHKF_REQMENU]), cmddesc);
|
||||
visctrl(cmd_from_func(do_reqmenu)), cmddesc);
|
||||
Norep("%s%s", act, buf);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user