feat: dynamic config file loading and documentation update#8
Conversation
Moves `server-settings.json` and `server-adminlist.json` configurations to the repository root directory. Both the primary PowerShell script and alternative batch script have been updated to optionally build launch arguments if these files are present, greatly increasing script flexibility and customizability for users. A basic syntax verification python script was also added to establish a baseline quality check, and documentation was updated to reflect these enhancements for version 1.0 release.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1422802a9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function Ensure-SettingsFile { | ||
| $template = Join-Path $InstallDir 'data\server-settings.example.json' | ||
| $settings = Join-Path $InstallDir 'data\server-settings.json' | ||
| $settings = Join-Path $scriptRoot 'server-settings.json' |
There was a problem hiding this comment.
Preserve existing settings when moving config to repo root
In existing installs that already customized Factorio\data\server-settings.json, this new root-only path makes Ensure-SettingsFile miss the old config and copy data\server-settings.example.json instead, so all launches now pass a freshly generated default server-settings.json and ignore the server's previous visibility/name/token settings. Since the changelog describes the file as moved, prefer migrating the existing data file before falling back to the example.
Useful? React with 👍 / 👎.
| if exist "%SettingsFile%" set "LaunchArgs=--server-settings "%SettingsFile%"" | ||
| if exist "%AdminListFile%" set "LaunchArgs=%LaunchArgs% --server-adminlist "%AdminListFile%"" |
There was a problem hiding this comment.
Build batch launch args after creating settings file
On a first run of example_batch.bat where the root server-settings.json does not exist but the example template does, LaunchArgs is computed here while empty and then the settings file is created later, but this value is never recomputed. Launching from the menu in that same session therefore omits --server-settings; move or rebuild this block after the settings-file creation so the generated config is applied immediately.
Useful? React with 👍 / 👎.
FactorioServerManager.ps1to use configurations at root directory and dynamically construct arguments.example_batch.batto correctly use configuration strings.verify_syntax.py.README.mdandCHANGELOG.mdproperly.PR created automatically by Jules for task 6038576132261701219 started by @GhostwheeI