Add "user canceled" as extended command return value

Instead of returning ECMD_OK, the commands now return ECMD_CANCEL
when user declined to pick a direction or an object to act on.

Note that this can be ORed with ECMD_TIME, if the command still
took a turn.

For now this has no gameplay meaning.
This commit is contained in:
Pasi Kallinen
2022-01-08 20:04:54 +02:00
parent bcccfaaeac
commit 68b822e4dc
22 changed files with 78 additions and 73 deletions

View File

@@ -1016,7 +1016,7 @@ use_pick_axe(struct obj *obj)
*dsp = 0;
Sprintf(qbuf, "In what direction do you want to %s? [%s]", verb, dirsyms);
if (!getdir(qbuf))
return res;
return (res|ECMD_CANCEL);
return use_pick_axe2(obj);
}