mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
Add warning to generated server-settings.json
Leave a warning in case someone opens and tries to modify the server-settings.json file in the instance folder, as any changes made will be lost when it's overwritten.
This commit is contained in:
1 parent
fc6e9d0002
commit
51f7430a4b
1 file changed
+5
-1
@@ -592,7 +592,11 @@ rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " ");
|
||||
* factorio_settings config entry.
|
||||
*/
|
||||
async writeServerSettings() {
|
||||
let serverSettings = await this.resolveServerSettings(this.config.get("factorio.settings"));
|
||||
const warning = "Changes to this file will be overwitten by the factorio.settings config on the instance.";
|
||||
const serverSettings = {
|
||||
"_comment_warning": warning,
|
||||
...await this.resolveServerSettings(this.config.get("factorio.settings")),
|
||||
};
|
||||
await lib.safeOutputFile(
|
||||
this.server.writePath("server-settings.json"),
|
||||
JSON.stringify(serverSettings, null, 4)
|
||||
|
||||
Reference in new issue
Block a user