Add dialogs for death match setup.
This commit is contained in:
parent
98ce0a96ee
commit
b6d761f67e
@ -30,7 +30,6 @@ grepStrings=(
|
|||||||
'-e' '^"cl_run"'
|
'-e' '^"cl_run"'
|
||||||
'-e' '^Game saved. '
|
'-e' '^Game saved. '
|
||||||
'-e' '^A secret is revealed!$'
|
'-e' '^A secret is revealed!$'
|
||||||
'-e' '^MAP[0-9]*'
|
|
||||||
'-e' '^Player[: ]'
|
'-e' '^Player[: ]'
|
||||||
'-e' '^Please select a game wad \(or 0 to exit\):'
|
'-e' '^Please select a game wad \(or 0 to exit\):'
|
||||||
'-e' '^You have no keys in your pocket!$'
|
'-e' '^You have no keys in your pocket!$'
|
||||||
@ -39,7 +38,6 @@ grepStrings=(
|
|||||||
sedStrings=(
|
sedStrings=(
|
||||||
'-e' 's/"cl_run" = "true"/run/'
|
'-e' 's/"cl_run" = "true"/run/'
|
||||||
'-e' 's/"cl_run" = "false"/walk/'
|
'-e' 's/"cl_run" = "false"/walk/'
|
||||||
'-e' 's/MAP0\([1-9]\)/Map \1/'
|
|
||||||
'-e' 's:.*/:Game saved. (:'
|
'-e' 's:.*/:Game saved. (:'
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -100,10 +98,18 @@ case ${buttonCode} in
|
|||||||
[6]="2 4"
|
[6]="2 4"
|
||||||
[7]="2 4"
|
[7]="2 4"
|
||||||
[8]="2 4")
|
[8]="2 4")
|
||||||
# Dialog statement to choose map goes here
|
map="$(dialog --backtitle "Select Map" \
|
||||||
map="1"
|
--clear \
|
||||||
# Dialog statement to choose fraglimit goes here
|
--no-tags \
|
||||||
fraglimit=20
|
--cancel-label "Exit" \
|
||||||
|
--ok-label "Host" \
|
||||||
|
--menu "Please select one" 0 0 0 "${maps[@]}" --stdout)"
|
||||||
|
fraglimit="$(dialog --backtitle "Fraglimit" \
|
||||||
|
--clear \
|
||||||
|
--ok-label "Next" \
|
||||||
|
--cancel-label "Exit" \
|
||||||
|
--rangebox "Select Fraglimit" -1 -1 1 1000000 20 --stdout)"
|
||||||
|
[[ $? -eq 1 ]] && exit 0
|
||||||
# Get ip address
|
# Get ip address
|
||||||
yourIpAddress="$(curl -4s https://icanhazip.com)"
|
yourIpAddress="$(curl -4s https://icanhazip.com)"
|
||||||
players="$(dialog --backtitle "Host Deathmatch Game" \
|
players="$(dialog --backtitle "Host Deathmatch Game" \
|
||||||
|
Loading…
Reference in New Issue
Block a user