autounlock:untrap
Implement 'untrap' as an 'autounlock' action. Quite a bit more work than anticipated. The new documentation is rather clumsy; too many if-this and if-not-that clauses have intruded. I'll be astonished if all the return values are correct.... [A couple of places were checking for (rx != 0 && ry != 0) to decide whether they were performating an autounlock action at <rx,ry> but that erroneously excludes the top line of the map if the current level extends that far. Just check rx for zero/non-zero.]
This commit is contained in:
@@ -4534,8 +4534,6 @@ handler_autounlock(int optidx)
|
||||
start_menu(tmpwin, MENU_BEHAVE_STANDARD);
|
||||
any = cg.zeroany;
|
||||
for (i = 0; i < SIZE(unlocktypes); ++i) {
|
||||
if (i == 1) /*** suppress 'untrap' from the menu... ***/
|
||||
continue; /*** until it actually gets implemented ***/
|
||||
Sprintf(buf, "%-10.10s%c%.40s",
|
||||
unlocktypes[i][0], sep, unlocktypes[i][1]);
|
||||
presel = !i ? !flags.autounlock : (flags.autounlock & (1 << (i - 1)));
|
||||
|
||||
Reference in New Issue
Block a user