context-sensitive invent: corpses

Picking a corpse while looking at inventory issued a menu that had
entry for eating that and if on an altar another one for offering
that.  Picking the eat or offer choice worked as long as there
weren't any other corpses on the ground or altar.  If there were
others, they'd be skipped but you'd get prompted for which item in
inventory to eat or offer instead of operating on the one that was
used to initiate the action.
This commit is contained in:
PatR
2022-04-11 15:02:44 -07:00
parent 4d1caf8e3a
commit 53e10d582d
4 changed files with 19 additions and 8 deletions
+2 -2
View File
@@ -1700,7 +1700,7 @@ dotakeoff(void)
pline("Not wearing any armor or accessories.");
return ECMD_OK;
}
if (Narmorpieces != 1 || ParanoidRemove || g.command_queue)
if (Narmorpieces != 1 || ParanoidRemove || cmdq_peek())
otmp = getobj("take off", takeoff_ok, GETOBJ_NOFLAGS);
if (!otmp)
return ECMD_CANCEL;
@@ -1719,7 +1719,7 @@ doremring(void)
pline("Not wearing any accessories or armor.");
return ECMD_OK;
}
if (Naccessories != 1 || ParanoidRemove || g.command_queue)
if (Naccessories != 1 || ParanoidRemove || cmdq_peek())
otmp = getobj("remove", remove_ok, GETOBJ_NOFLAGS);
if (!otmp)
return ECMD_CANCEL;