mirror of
https://github.com/JonasunderscoreJones/dayz-linux-gui-launcher.git
synced 2025-10-23 00:09:19 +02:00
feat: add the --name parameter
This commit is contained in:
parent
cc9bc79c4d
commit
d72885134f
2 changed files with 16 additions and 0 deletions
|
@ -28,6 +28,11 @@ Command line options:
|
|||
Launch DayZ after resolving and setting up mods
|
||||
instead of printing the game's -mod command line argument.
|
||||
|
||||
-n <name>
|
||||
--name <name>
|
||||
Set the profile name when launching the game via --launch.
|
||||
Some community servers require a profile name when trying to connect.
|
||||
|
||||
-s <address[:port]>
|
||||
--server <address[:port]>
|
||||
Retrieve a server's mod list and add it to the remaining input.
|
||||
|
|
11
dayz-mods.sh
11
dayz-mods.sh
|
@ -24,6 +24,7 @@ DEBUG=0
|
|||
LAUNCH=0
|
||||
SERVER=""
|
||||
PORT="27016"
|
||||
NAME=""
|
||||
INPUT=()
|
||||
MODS=()
|
||||
|
||||
|
@ -57,6 +58,11 @@ Command line options:
|
|||
Launch DayZ after resolving and setting up mods
|
||||
instead of printing the game's -mod command line argument.
|
||||
|
||||
-n <name>
|
||||
--name <name>
|
||||
Set the profile name when launching the game via --launch.
|
||||
Some community servers require a profile name when trying to connect.
|
||||
|
||||
-s <address[:port]>
|
||||
--server <address[:port]>
|
||||
Retrieve a server's mod list and add it to the remaining input.
|
||||
|
@ -101,6 +107,10 @@ while (( "$#" )); do
|
|||
PORT="${2}"
|
||||
shift
|
||||
;;
|
||||
-n|--name)
|
||||
NAME="${2}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
INPUT+=("${1}")
|
||||
;;
|
||||
|
@ -199,6 +209,7 @@ main() {
|
|||
local cmdline=()
|
||||
[[ -n "${mods}" ]] && cmdline+=("-mod=${mods}")
|
||||
[[ -n "${SERVER}" ]] && cmdline+=("-connect=${SERVER}" -nolauncher -world=empty)
|
||||
[[ -n "${NAME}" ]] && cmdline+=("-name=${NAME}")
|
||||
( set -x; steam -applaunch "${DAYZ_ID}" "${cmdline[@]}"; )
|
||||
elif [[ -n "${mods}" ]]; then
|
||||
msg "Add this to your game's launch options, including the quotes:"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue