[1.6.7] Chests can overlap (worse bug than it sounds)
Posted: Fri Aug 28, 2020 9:05 pm
The glowing chest event can spawn two chests on the same square. This is worse than it sounds: when this happens, you can only open one of the chests, but leaving and re-entering the level will allow opening that chest again. This lets you get unlimited copies of whatever item is in the chest. The event should check if a chest is already on the chosen square, and pick a different square if so.
Bonus: 7 years ago, I posted about a bug with chest visuals. A while ago, I finally looked at the code to see what causes that bug: when the chest is opened, it simply sets self.add_displays[1].image to the opened chest sprite; if there was already an add_displays on the terrain the chest was placed on, this will change the wrong add_display. It should instead iterate through all of self.add_displays and find the one with the "object/chest3.png" image, and change that one.
Bonus: 7 years ago, I posted about a bug with chest visuals. A while ago, I finally looked at the code to see what causes that bug: when the chest is opened, it simply sets self.add_displays[1].image to the opened chest sprite; if there was already an add_displays on the terrain the chest was placed on, this will change the wrong add_display. It should instead iterate through all of self.add_displays and find the one with the "object/chest3.png" image, and change that one.