getmodeacr

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6193 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-04-01 22:59:25 +00:00
parent 462845ff08
commit 8a92c89206
3 changed files with 39 additions and 13 deletions
+2
View File
@@ -257,6 +257,8 @@ docident [minlod] [Minimal level of detail.];
docargument [V] [] [min 25/max 250/default 60];
docident [modeacronyms] [Toggles use of acronyms instead of full modenames in the serverbrowser.];
docargument [B] [] [min 0/max 1/default 0];
docident [getmodeacr] [Returns the current game mode's acronym.];
docexample [echo (getmodeacr)] [Example output: CTF];
docident [networkdebug] [Enables output of processed network packets.];
docargument [B] [enable network debugging] [min 0/max 1/default 0];
docremark [This variable only has an effect if the client binary is compiled in debug mode.];
+22 -13
View File
@@ -227,18 +227,22 @@ toggleshowmap = [ showmap 1; onrelease [ showmap 0 ] ]
// arg7 "server description"
// TODO: interpret a#3,4,5,6 [ft:any1:2010apr04]
sbdns = ""; sbport = ""; sbdesc = ""; sbmsg = ""; sbpwd = "";
sbdns = ""; sbport = ""; sbdesc = ""; sbmsg = ""; sbpwd = ""
sbconnect = [
sbdns = $arg1; sbport = $arg2; sbdesc = $arg7; sbpwd = ""; sbmsg = ""
if (>= $arg6 1) [
sbmsg = "You are banned from this server."; showmenu "password required"; ] [
if (= $arg5 1) [
sbmsg = "This server is set to private."; showmenu "password required"; ] [
if (= $arg4 1) [
sbmsg = "This server is password-protected."; showmenu "password required";
] [
echo connecting to $arg7; connect $arg1 $arg2;
] ] ]
sbdns = $arg1; sbport = $arg2; sbdesc = $arg7; sbpwd = ""; sbmsg = ""
if (>= $arg6 1) [
sbmsg = "You are banned from this server."; showmenu "password required"
] [
if (= $arg5 1) [
sbmsg = "This server is set to private."; showmenu "password required"
] [
if (= $arg4 1) [
sbmsg = "This server is password-protected."; showmenu "password required"
] [
echo connecting to $arg7; connect $arg1 $arg2;
]
]
]
]
// For those players who use IRC too much...
@@ -284,8 +288,8 @@ pasteent = [
// megabind - Binds a key to many different actions depending on the current game state.
megabind = [
if (= $numargs 6) [
bind $arg1 (format "if (watchingdemo) [%1] [if (|| $editing (= $gamemode 1)) [%2] [if $connected [%3] [if (curmodeattr bot) [%4] [%5]]]]" $arg2 $arg3 $arg4 $arg5 $arg6)
] []
bind $arg1 (format "if (watchingdemo) [ %1 ] [ if (|| $editing (= $gamemode 1)) [ %2 ] [ if $connected [ %3 ] [ if (curmodeattr bot) [ %4 ] [ %5 ] ] ] ]" $arg2 $arg3 $arg4 $arg5 $arg6)
]
]
// getscrext - Returns the proper file extension for the client's current screenshottype setting, including the "."
@@ -299,6 +303,11 @@ getscrext = [
]
]
// getmodeacr - Returns the proper current mode's acronym.
gamemodes_list = [ TDM COOP DM SURV TSURV CTF PF BTDM BDM LSS OSOK TOSOK BOSOK HTF TKTF KTF ]
getmodeacr = [ result (at $gamemodes_list $gamemode) ]
// Simple claim-admin script for one single-server.
// Fill in the 3 aliases below, and uncomment the below line to activate.
// bind F3 "customclaimadminscript"
+15
View File
@@ -650,6 +650,7 @@
</example>
</examples>
<references>
<identifierReference identifier="getmodeacr"/>
<identifierReference identifier="screenshottype"/>
</references>
</command>
@@ -1084,6 +1085,20 @@
<description>Toggles use of acronyms instead of full modenames in the serverbrowser.</description>
<value token="B" description="" minValue="0" maxValue="1" defaultValue="0"/>
</variable>
<variable name="getmodeacr">
<description>Returns the current game mode's acronym.</description>
<examples>
<example>
<code><![CDATA[echo (getmodeacr)]]></code>
<explanation>Example output: CTF</explanation>
</example>
</examples>
<references>
<identifierReference identifier="getscrext"/>
<identifierReference identifier="modeacronyms"/>
</references>
</variable>
<variable name="resetbinds">
<description>Resets all binds back to their default values.</description>