mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
6320b982a8
Godot's ConfigFile writer does not round-trip comments in project.godot. An observed rewrite deleted both `;` blocks outright and spliced the three-line `#` block above run/main_scene.dedicated_server onto the setting's own line, leaving it commented out — which would send dedicated builds to the interactive main menu instead of server_boot.tscn, with nothing failing until someone noticed a server process rendering a menu. Move the explanations into the code that owns the settings (server_boot.gd for the dedicated-server override, video_settings.gd for stretch mode and vsync) so they cannot be destroyed by a rewrite, and leave project.godot holding only assignments plus Godot's own regenerated header. Add tests/cases/test_project_settings.gd as the backstop: the feature-override assertions read project.godot as text and reject a line that has been folded into a comment, since ProjectSettings resolves `key.<feature>` overrides at load time and never exposes the suffixed key. Verified by reproducing the exact corruption, which fails the test, and it also covers the Jolt physics engine, the required autoloads, and that no test-hook autoload is ever shipped registered.