The #tip command tries to reduce verbosity by formatting drop messages with just the object name instead of with full sentences, yielding Objects spill out: obj1, obj2, obj3, ..., objN. where the trailing comma or period is included with each successive object. If an intervening message occurs, such "25 zorkmids are added to your credit", the rest of the objects will no longer be extending the original sentence and end up looking silly. Objects spill out: obj1, obj2,--More-- 25 zorkmids are added to your credit. obj3, ..., objN. This fix causes the post-interruption messages to revert to verbose format. Objects spill out: obj1, obj2,--More-- 25 zorkmids are added to your credit.--More-- obj3 drops to the floor.--More-- ... objN drops to the floor. The interrupting message still follows the comma of the partial sentence, but I don't see any sane way to fix that other than to abandon the terse format altogether, and doing that makes #tip way too verbose when the container has a lot of items in it. But #tip inside shops now does that, since there will always be buy/not- interested feedback interrupting the terse format in that situation. For other situations, a full sentence message might end up following a partial sentence list of dropped items. There was a more significant bug. Dropping a hero-owned container with gold in it onto shop floor sold the gold to shk, giving hero credit. Subsequent #tip gave the hero credit for that same gold when it spilled out. addtobill(obj) relies on obj->ox,oy to determine whether events are taking place in a shop, and #tip was relying on placement onto floor to set those, too late for shop billing. The fix yields suboptimal results: you're given credit when you drop the container, then during #tip when you spill the contents, credit for the gold is removed, then new credit for it is given. That's down to shop insanity, not tipping behavior.
20 KiB
20 KiB