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:
@@ -4174,7 +4174,7 @@ doorganize(void) /* inventory organizer by Del Lamb */
|
||||
/* get object the user wants to organize (the 'from' slot) */
|
||||
obj = getobj("adjust", adjust_filter, GETOBJ_PROMPT | GETOBJ_ALLOWCNT);
|
||||
if (!obj)
|
||||
return ECMD_OK;
|
||||
return ECMD_CANCEL;
|
||||
/* can only be gold if check_invent_gold() found a problem: multiple '$'
|
||||
stacks and/or gold in some other slot, otherwise (*adjust_filter)()
|
||||
won't allow gold to be picked; if player has picked any stack of gold
|
||||
|
||||
Reference in New Issue
Block a user