stuf / masayards-calmm

An attempt at a sane alternative viewer for Kantai Collection (艦隊これくしょん)
MIT License
5 stars 0 forks source link

Change game data object lists into maps/objects #12

Closed stuf closed 7 years ago

stuf commented 7 years ago

I'm not entirely sure why I didn't do this in the first place. All of the lists of data that we add listeners for processing could be made into maps instead. This way, there's no need to use L.find or make any other intermediate steps when creating a final presentable object.

As an example the ever-so-lovely Fleet model; it contains a list of unique IDs that point toward an object in the player roster. Additionally, a player Ship object is not yet final—it only contains the player-specific data, such as equipment, level-specific stats, experience and so forth—so it doesn't contain things like the name, class and base stats that might be needed for stat calculation, among other things.