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:
@@ -1434,7 +1434,7 @@ doinvoke(void)
|
||||
|
||||
obj = getobj("invoke", invoke_ok, GETOBJ_PROMPT);
|
||||
if (!obj)
|
||||
return ECMD_OK;
|
||||
return ECMD_CANCEL;
|
||||
if (!retouch_object(&obj, FALSE))
|
||||
return ECMD_TIME;
|
||||
return arti_invoke(obj);
|
||||
@@ -1532,7 +1532,7 @@ arti_invoke(struct obj *obj)
|
||||
|
||||
if (!otmp) {
|
||||
obj->age = 0;
|
||||
return ECMD_OK;
|
||||
return ECMD_CANCEL;
|
||||
}
|
||||
b_effect = (obj->blessed && (oart->role == Role_switch
|
||||
|| oart->role == NON_PM));
|
||||
|
||||
Reference in New Issue
Block a user