BeamMP / BeamMP-Server

Server for the multiplayer mod BeamMP for BeamNG.drive
https://beammp.com
GNU Affero General Public License v3.0
116 stars 49 forks source link

ServerConfig.toml Clears Commented Lines I Added. #312

Open Darkstar77 opened 2 months ago

Darkstar77 commented 2 months ago

OS: Linux (Containerized on Unraid) BeamNG-MP-Server v3.2.2

Describe the bug I've been swapping around the map my server is running, and thought it would be a great idea to just add additional commented (starting with a #) lines into the file to document the different map lines I have. My thinking being I can just stop the server, comment out the current one, uncomment the one I wish the server to run, and start the server back up. Unfortunately every time the server starts it removes all the additional commented lines I added. I've tried at the top of the file, in the middle where the map line is defined, and at the bottom. It does not matter, as soon as the server starts it removes all the extra commented lines. It keeps the correct map line, and all my other settings.

To Reproduce

  1. Stop your server.
  2. Add several commented lines to your ServerConfig.toml file, such as additional map entries.
  3. Start your server.
  4. Check your ServerConfig.toml file, and all the added and commented lines are gone.

Expected behavior For the configuration to keep any additional commented lines I added, so I can more easily manage the map my server is running.

Alternately, let's get map rotation working, so the map can be switched without editing the config and restarting the server.

Logs With DEBUG enabled, there is no mention of anything related to this.

Mack29446 commented 2 months ago

240 could tie into this actually as a temporary fix - prevent the server from generating or otherwise editing the config, but still read from it?