Today while processing a feature request for Abiathar (the ability to shuffle levels around, changing their IDs), I noticed a crash bug in the level copy feature. When overwriting existing levels, it always tried to remove that level's entry in the view state cache, but that resulted in a KeyNotFoundException if that level had not been visited yet. I added a check for LevelViewStates.ContainsKey and the crash was fixed.
I then went to implement that feature request. It was a bit tricky, but I got the Level | Properties feature to enable changing the level ID. When the level ID is changed to the ID of an existing level, an option is provided to swap, reordering the levels. The undoable action description (for the Time Machine) is even customized based on whether the level was moved, swapped, or simply reconfigured.
No comments:
Post a Comment