dropping unpaid items vs containers (trunk only)
From a bug report, the 'D' command would list 'u' as an item category choice if you were carrying unpaid items inside a container, but if those were the only unpaid items then nothing would happen once the dropping stage was reached. Applied to all menustyles (except partial, which bypasses categories and goes straight to a menu listing all items). There were two alternatives for the fix: suppress 'u' as an applicable category when it only applies to container contents, or include the container among the drop candidates even though it isn't an unpaid item itself. I went with the latter; it's simpler to implement and also feels a little more intuitive than behaving like there aren't any unpaid items present.
This commit is contained in:
@@ -1233,7 +1233,7 @@ STATIC_PTR int
|
||||
ckunpaid(otmp)
|
||||
register struct obj *otmp;
|
||||
{
|
||||
return((int)(otmp->unpaid));
|
||||
return (otmp->unpaid || (Has_contents(otmp) && count_unpaid(otmp)));
|
||||
}
|
||||
|
||||
boolean
|
||||
|
||||
Reference in New Issue
Block a user