glest / glest-source

Glest is a network multi-player cross-platform 3D real-time strategy (RTS) game, where you create armies of units and battle different factions.
https://glest.io
GNU General Public License v3.0
56 stars 39 forks source link

refactor code dealing with map extensions #246

Closed andy5995 closed 5 years ago

andy5995 commented 5 years ago

These are all the places where the extensions of maps (zgm, mgm, and gbm) are specified:

https://github.com/ZetaGlest/zetaglest-source/commit/62e3819d867ed0513cb8f436cab61b6aed7673ff

it would be best if there was just one or two spots where extensions can be added or changed.

Not that we're planning on actually adding or changing them anymore, but refactoring would reduce the amount of code, and may make a nice learning opportunity for someone. ;)

andy5995 commented 5 years ago

Since there are 3 extensions, an array would probably be suitable, so loops could be used in at least one or 2 of the areas shown in the commit link above.