therealchjones / mffer

Marvel Future Fight exploration & reporting
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Sort dictionaries/arrays(?) on json output #180

Closed therealchjones closed 2 years ago

therealchjones commented 2 years ago

Asset properties (via AssetsToolsNETReader or AssetsTools as currently in ToGameObjectExtensions) are already imported in a sorted order (via SortedDictionary); certainly don't want to do these again. And arrays should probably not be sorted (differently than however they already are), as some things probably depend on their index.

therealchjones commented 2 years ago

Really the goal here is for output to be reproducible and comparable from version to version; will need to test to see if it now is.

therealchjones commented 2 years ago

Had to revert from using some SortedDictionary instances with assets as they were being copied item-by-item to game objects rather than being used directly. May be able to simply make the GameObject Value dictionary a SortedDictionary, but this will be nontrivial because of validation and other references that check generic types that may be different.

therealchjones commented 2 years ago

Okay, will go back to using SortedDictionaries in the AssetReaders, followed by the regular ToGameObject() on them, which will copy them into regular dictionaries. This is probably inefficient but easy for the time being.

therealchjones commented 2 years ago

Done, included in #176