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.
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 publicstatic const
instead just be available directly.