From b056148d75cf5151e3eab24759aaf8cd8f30ad08 Mon Sep 17 00:00:00 2001 From: Christophe Vandekerchove Date: Sun, 27 Mar 2016 18:39:55 +0200 Subject: [PATCH] Added dissalow_commands feature --- README.md | 9 +++++++++ smart_launch.sh | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a0ff879..3068351 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Current Version #### Factorio See [factorio's site](http://www.factorio.com) #### Docker image +* Added possibility to allow commands in game * Automatically takes latest save or autosave. when restarting the container. * Added possibility to change default autosave interval * Added possibility to change default autosave slots @@ -83,6 +84,14 @@ docker run -d \ zopanix/factorio ``` Where [PATH] is the path to the folder with your mods. +#### Allowing in-game commands +I've always disabled in-game commands because I think it is like cheating, however, you can enable them by setting the the "FACTORIO_DISSALOW_COMMANDS" to "false". +``` +docker run -d \ + --env FACTORIO_DISSALOW_COMMANDS=false \ + -p [PORT]:34197/udp \ + zopanix/factorio +``` ToDo's ----- * Add possibility to allow in-game commands ( can be considered as cheating :-p ) diff --git a/smart_launch.sh b/smart_launch.sh index c1f496a..bbe0098 100755 --- a/smart_launch.sh +++ b/smart_launch.sh @@ -20,11 +20,17 @@ else echo "###" fi +# Checking options +if [ $FACTORIO_DISSALOW_COMMANDS -eq "false" ]; then + disallow_commands="" +else + disallow_commands="--disallow-commands" +fi echo "###" echo "# Launching Game" echo "###" exec /opt/factorio/bin/x64/factorio \ - --disallow-commands \ + $disallow_commands \ --autosave-interval ${FACTORIO_AUTOSAVE_INTERVAL} \ --autosave-slots ${FACTORIO_AUTOSAVE_SLOTS} \ --start-server \