Allow dropping just picked up items

When using a menu to drop or put in items into a container,
allow putting in the item (or items) you picked up previously,
by selecting the 'P' entry from the item class menu

Inspired by the itemcat patch by Stanislav Traykov.

Invalidates saves and bones.
This commit is contained in:
Pasi Kallinen
2021-09-17 20:52:54 +03:00
parent e43ec0cef1
commit b30061b5ad
14 changed files with 183 additions and 30 deletions

View File

@@ -117,7 +117,8 @@ struct obj {
Bitfield(cknown, 1); /* for containers (including statues): the contents
* are known; also applicable to tins */
Bitfield(lknown, 1); /* locked/unlocked status is known */
/* 4 free bits */
Bitfield(pickup_prev, 1); /* was picked up previously */
/* 3 free bits */
int corpsenm; /* type of corpse is mons[corpsenm] */
#define leashmon corpsenm /* gets m_id of attached pet */