SpacemanDMM
SpacemanDMM copied to clipboard
Coalesce duplicate tile definitions on save.
This change modifies maps just before saving to find instances of multiple keys sharing the same prefab data, and removing all but one from the dictionary, assigning that one to any coordinate on the grid which needs that prefab data.
No test case but I ran the implementation through https://github.com/warriorstar-orion/avulto with small and large maps and sanity checked its behavior. It doesn't seem to have much of a performance impact on save, either.