AttorneyOnline / AO2-Client

An off-the-cuff courtroom drama simulator
https://aceattorneyonline.com
GNU General Public License v3.0
61 stars 59 forks source link

Lift out most server-related data into its own class #955

Closed Cerapter closed 4 months ago

Cerapter commented 4 months ago

Part 1 of ??? of my refactoring attempts, just needed something easy to start with.

The PR is as it says: lifts most everything related to a server's data to its own class.

The biggest trickery is probably the BASE_FEATURE_SET enum -- here, I use Qt's built-in enum magicks to convert the enum value's name to a string. They are named exactly as they were before, just capitalised, and the check is still done with lowercase, so the end result is the same, except now the game can support arbitrary features if need be.

Additionally, some unused parts of the code were removed. This includes the various character / music list sizes, loaded evidence / character / music list counts, and the various methods that return the already const version numbers -- these were made public static const instead just be available directly.