new menu to configure package server priorities
This commit is contained in:
@@ -449,7 +449,7 @@ alias menufilesort_dmo 0
|
||||
|
||||
newmenu Misc
|
||||
menuitemcheckbox [Auto map download: ] "$autogetmap" [ autogetmap $arg1 ]
|
||||
menuitemcheckbox [Auto media download: ] "$autodownload" [ autodownload $arg1 ]
|
||||
menuitem [Configure auto media download --> ] [ showmenu "Autodownload config"]
|
||||
menuitemcheckbox [Show gamemodes as acronyms: ] "$modeacronyms" [ modeacronyms $arg1 ]
|
||||
menuitemcheckbox [Show quit dialog when quitting: ] "$askquit" [ askquit = $arg1 ]
|
||||
menuitemcheckbox [Show main menu when starting AC: ] "$showmenuonstartup" [ showmenuonstartup = $arg1 ]
|
||||
@@ -702,6 +702,60 @@ menuitemtextinput [Shotgun: ] [gibmessage 3] [ gibmessage 3 $arg1 ] [] 15
|
||||
menuitemtextinput [Sniper: ] [gibmessage 5] [ gibmessage 5 $arg1 ] [] 15
|
||||
menuitemtextinput [Grenades: ] [gibmessage 8] [ gibmessage 8 $arg1 ] [] 15
|
||||
|
||||
tempalias __pckserv ""
|
||||
|
||||
newmenu "Autodownload config"
|
||||
menuinit [
|
||||
delmenu (curmenu) ; newmenu (curmenu)
|
||||
push serverlist (getpckserver)
|
||||
push words (listlen $serverlist)
|
||||
if (! $words) [
|
||||
menuitem "no package servers configured" -1
|
||||
] [
|
||||
if (= $words 1) [
|
||||
menuitem $serverlist -1
|
||||
] [
|
||||
menuitem "\f2priority\tping\tstatus\thost address" -1
|
||||
looplist $serverlist [host priority ping resolved] [
|
||||
resolved = (at ["\f2no response" "\f0ok"] $resolved)
|
||||
if (<= $priority -1000) [ resolved = "\f2disabled" ]
|
||||
if (<= $priority -10000) [ resolved = "\f3deleted" ]
|
||||
menuitem (concatword (if (<= $priority -1000) "" $priority) "\t" $ping "\t\fs" $resolved "\fr\t" $host) (concat alias __pcksrv "[" (escape $host) $priority $ping (escape $resolved) "] ; showmenu [Configure package server]")
|
||||
]
|
||||
]
|
||||
]
|
||||
menuitem "" -1
|
||||
menuitemcheckbox [Enable auto media download: ] "$autodownload" [ autodownload $arg1 ]
|
||||
menuitem "Add package server -->" [ inputcommand "" "addpckserver $cmdbuf" "enter host address:" ]
|
||||
menuitem "" -1
|
||||
menuitem "\f4you need to restart the game for changes to take effect" -1
|
||||
pop serverlist words
|
||||
]
|
||||
|
||||
newmenu "Configure package server"
|
||||
menuinit [
|
||||
delmenu (curmenu) ; newmenu (curmenu)
|
||||
if (!= (listlen $__pcksrv) 4) [
|
||||
menuitem "----- no server selected ------" -1
|
||||
] [
|
||||
push priority (at $__pcksrv 1)
|
||||
menuitem (concatword "Host address \t\f2" (at $__pcksrv 0)) -1
|
||||
menuitemtextinput "Priority \t" $priority [addpckserver (at $__pcksrv 0) $arg1]
|
||||
menuitem (concatword "Ping \t" (at $__pcksrv 2)) -1
|
||||
menuitem (concatword "Status \t" (at $__pcksrv 3)) -1
|
||||
menuitem "" -1
|
||||
if (<= $priority -1000) [
|
||||
menuitem "\f0[Enable server]" (concat addpckserver (at $__pcksrv 0) 0 "; closecurmenu")
|
||||
] [
|
||||
menuitem "\f3[Disable server]" (concat addpckserver (at $__pcksrv 0) -1000 "; closecurmenu")
|
||||
]
|
||||
if (> $priority -10000) [
|
||||
menuitem "\f3[Mark server for deletion]" (concat addpckserver (at $__pcksrv 0) -10000 "; closecurmenu")
|
||||
]
|
||||
pop priority
|
||||
]
|
||||
]
|
||||
|
||||
tempalias __zip ""
|
||||
|
||||
newmenu "Mod package"
|
||||
|
||||
Reference in New Issue
Block a user