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
57 stars 39 forks source link

add headless server option to load game settings file #171

Closed andy5995 closed 5 years ago

andy5995 commented 6 years ago

A 4th option would be good here , to specify an .mgg file from https://github.com/ZetaGlest/zetaglest-data/tree/develop/data or any other path. (it would help with https://github.com/ZetaGlest/zetaglest-data/pull/129)

--headless-server-mode=x,x  

                        Run as a headless server.

                        Where x is an optional comma delimited command list of one or

                            more of the following: 

                        'exit' - which quits the application after a game has no more

                            connected players.

                        'vps' - which does NOT read commands from the local console

                            (for some vps's).

                        'lan' - which does not broadcast the hosting server to the

                            masterserver (for local LAN games).

UPDATE:

There's already some existing code that opens an .mgg file, see https://github.com/ZetaGlest/zetaglest-data/pull/129#issuecomment-399732512 for some extra details (hint: the --auto-test option). Also, the headless server by default reads one of the 2 files in https://github.com/ZetaGlest/zetaglest-data/tree/develop/data. Those filenames are hard-coded into the source code.