Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom maps #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUST_SERVER_PORT (DEFAULT: "" - Rust server port 28015 if left blank or numeric
RUST_SERVER_QUERYPORT (DEFAULT: "" - Rust server query port 28016 if left blank or numeric value)
RUST_SERVER_SEED (DEFAULT: "12345" - The server map seed, must be an integer)
RUST_SERVER_WORLDSIZE (DEFAULT: "3500" - The map size, must be an integer)
RUST_SERVER_LEVELURL (DEFAULT: "" - An URL pointing towards a custom map. When using this RUST_SERVER_SEED and RUST_SERVER_WORLDSIZE are ignored.)
RUST_SERVER_NAME (DEFAULT: "Rust Server [DOCKER]" - The publicly visible server name)
RUST_SERVER_MAXPLAYERS (DEFAULT: "500" - Maximum players on the server, must be an integer)
RUST_SERVER_DESCRIPTION (DEFAULT: "This is a Rust server running inside a Docker container!" - The publicly visible server description)
Expand Down
11 changes: 9 additions & 2 deletions start_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,15 @@ add_argument_pair ARGUMENTS "+server.port" "RUST_SERVER_PORT"
add_argument_pair ARGUMENTS "+server.queryport" "RUST_SERVER_QUERYPORT"
add_argument_pair ARGUMENTS "+server.identity" "RUST_SERVER_IDENTITY"

add_argument_pair ARGUMENTS "+server.worldsize" "RUST_SERVER_WORLDSIZE"
add_argument_pair ARGUMENTS "+server.seed" "RUST_SERVER_SEED"

if [ -z "$RUST_SERVER_LEVELURL" ]; then
add_argument_pair ARGUMENTS "+server.worldsize" "RUST_SERVER_WORLDSIZE"
add_argument_pair ARGUMENTS "+server.seed" "RUST_SERVER_SEED"
echo "Generating procedural map.."
else
add_argument_pair ARGUMENTS "+server.levelurl" "RUST_SERVER_LEVELURL"
echo "Using custom map.."
fi

add_argument_pair ARGUMENTS "+server.hostname" "RUST_SERVER_NAME"
add_argument_pair ARGUMENTS "+server.url" "RUST_SERVER_URL"
Expand Down