object bypass bit sanity for container contents
Noticed when adding a 'tip container' choice to item-actions for context sensitive inventory (update pending). Putting items into a container with menustyle traditional and then takiing them out with the #tip command while 'sanity_check' is On would produce warnings once they were on the floor. askchain() uses object bypassing to be able to cope with multi-drop potentially changing invent, and it tried to reset that when done. But it did so with the original object list (invent in this case) and that doesn't reset individual objects that have been moved to any other list. The between-turn resetting of bypass bits wasn't doing so for container contents. The sanity check wasn't--still isn't--checking those either, so it wasn't noticeable while items were still inside the container. But taking them out with #tip doesn't touch any bypass bits, so between-turn reset isn't triggered and the items that came out of the container with bypass set continued to have it set while on floor. sanity_check complained. Change clear_bypasses() to handle container contents, and change askchain() to call it instead of just clearing bypasses for whatever is left of its input chain. (The latter probably isn't necessary now that the between-turn cleanup deals with contents.)
This commit is contained in:
@@ -877,6 +877,9 @@ restoring while attached ball or chain is on floor in a breach of a shop wall
|
||||
might trigger an impossible about being positioned too far from hero
|
||||
don't try to catch up for lost time for shop damage repair in restdamage()
|
||||
called from getlev(); let normal shopkeeper movement take care of it
|
||||
putting objects into a container with menustyle=traditional and then taking
|
||||
them back out with #tip would result in complaints about obj bypass
|
||||
bit being set if sanity_check was On
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
Reference in New Issue
Block a user