From 91f28e34a22309e8d08000210ee773b08a12a471 Mon Sep 17 00:00:00 2001 From: Entroper Date: Tue, 6 Jun 2017 13:20:10 -0400 Subject: [PATCH 1/2] add map-settings.json config file --- 0.15/docker-entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/0.15/docker-entrypoint.sh b/0.15/docker-entrypoint.sh index abf0fa1..60c1e23 100755 --- a/0.15/docker-entrypoint.sh +++ b/0.15/docker-entrypoint.sh @@ -21,10 +21,15 @@ if [ ! -f $CONFIG/map-gen-settings.json ]; then cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json fi +if [ ! -f $CONFIG/map-settings.json ]; then + cp /opt/factorio/data/map-settings.example.json $CONFIG/map-settings.json +fi + if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then /opt/factorio/bin/x64/factorio \ --create $SAVES/_autosave1.zip \ - --map-gen-settings $CONFIG/map-gen-settings.json + --map-gen-settings $CONFIG/map-gen-settings.json \ + --map-settings $CONFIG/map-settings.json fi exec /opt/factorio/bin/x64/factorio \ From 01aeb3b1aa37d21593fee2dd453c511547ec137f Mon Sep 17 00:00:00 2001 From: Entroper Date: Tue, 6 Jun 2017 14:22:31 -0400 Subject: [PATCH 2/2] Add map-settings.json to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b3bad2..4f609ad 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Now run the server as before. In about a minute the new version of Factorio shou ## Saves -A new map named `_autosave1.zip` is generated the first time the server is started. The `map-gen-settings.json` file in `/tmp/factorio/config` is used for the map settings. On subsequent runs the newest save is used. +A new map named `_autosave1.zip` is generated the first time the server is started. The `map-gen-settings.json` and `map-settings.json` files in `/tmp/factorio/config` are used for the map settings. On subsequent runs the newest save is used. To load an old save stop the server and run the command `touch oldsave.zip`. This resets the date. Then restart the server. Another option is to delete all saves except one.