Disable Factorio recycler on vanilla server
Validate, publish and promote Factorio chart / chart (push) Successful in 18s

This commit is contained in:
feedc0de committed 2026-10-27 08:04:47 +01:00
1 parent b21b78a287
commit df6af9d0d1
5 files changed
+65 -1

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
mod_list=${1:-/factorio/mods/mod-list.json}
mkdir -p "$(dirname "$mod_list")"
if [[ ! -s "$mod_list" ]]; then
printf '{"mods":[{"name":"base","enabled":true}]}\n' > "$mod_list"
fi
tmp_file="${mod_list}.tmp"
jq '
if (.mods | map(.name) | index("recycler")) then
.mods |= map(if .name == "recycler" then .enabled = false else . end)
else
.mods += [{"name":"recycler","enabled":false}]
end
' "$mod_list" > "$tmp_file"
mv "$tmp_file" "$mod_list"
+3
View File
@@ -13,6 +13,9 @@ cp /settings/server-settings.json /factorio/config/server-settings.json
cp /settings/server-adminlist.json /factorio/config/server-adminlist.json
cp /credentials/rcon-password /factorio/config/rconpw
chmod 600 /factorio/config/rconpw
# Recycler is shipped with Factorio 2.1 and is auto-enabled if omitted from
# mod-list.json. This vanilla server does not use the Space Age expansion.
/scripts/disable-recycler.sh /factorio/mods/mod-list.json
# Upstream uses bash xtrace, which would otherwise log the RCON password.
exec 3>/dev/null
export BASH_XTRACEFD=3