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.)
112 KiB
112 KiB