Closed tfausak closed 8 years ago
These changes make me think that I should have a better way of handling this. I'm thinking the product ID to name conversion could be done in two steps. The first would make the ID to its raw name, like 1
to Antenna_8Ball
. All that could be kept in a single JSON file that gets updated with every patch. Then the second step would convert that raw name into the name used in the game, like Antenna_8Ball
to 8-Ball
.
That would make this whole process easier. When a new patch comes out, I'd dump a new JSON file. Then I'd make sure I have mappings from all the new raw names. Then I'd basically be done.
That would mean that I wouldn't have a list of all the antennas, for example. I'd be treating all products the same. Maybe I could maintain a separate mapping between product IDs and their category. So 1
would map to Antenna
. That way I could provide a list of all antennas relatively easily.
I made a complete list of items. https://gist.github.com/tfausak/df1d1001847230f525e2d27cd556822f
Many of the new ones have lower IDs than you might expect. For instance the lightning boost has ID 405, but all the other new boosts are over 1,000.