addListOnQuit/on_quit.cfg - No more useless aliases in saved.cfg
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6224 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -335,6 +335,10 @@ docident [writecfg] [writes current configuration to config/saved.cfg - automati
|
||||
docsection [Gameplay]
|
||||
docident [add2alias] [This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.];
|
||||
docexample [foo = "one" add2alias foo two echo foo] [Output: one two];
|
||||
docident [addOnQuit] [Execute a command or block of code on quit.];
|
||||
docident [addListOnQuit] [Deletes a list of aliases (from saved.cfg) on quit.];
|
||||
docargument [L] [the list of aliases to delete] [] [0];
|
||||
docexample [addListOnQuit "a b c"] [Deletes aliases a, b, and c from existance and saved.cfg upon quit.];
|
||||
docident [addbot] [add a bot for a given team with a given skill calling him a given name.];
|
||||
docargument [T] [team] [RVSF or CLA or SPECTATOR] [0];
|
||||
docargument [S] [skill] [best, good, medium, worse OR bad] [0];
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// Adds a list of aliases to be deleted (cleared from saved.cfg) on every quit.
|
||||
// Do not modify. (unless you really know what you're doing)
|
||||
addListOnQuit = [ alias_list = $arg1; loop al (listlen $alias_list) [ addOnQuit (concat "delalias" (at $alias_list $al)) ] ]
|
||||
|
||||
on_quit_aliases = [
|
||||
cmapp
|
||||
i
|
||||
len
|
||||
modifier
|
||||
numcla
|
||||
numrvsf
|
||||
r
|
||||
s
|
||||
sbdesc
|
||||
sbdns sbport
|
||||
tmp_botmap
|
||||
tmp_botskill
|
||||
tmp_gamma_list
|
||||
tmp_hex
|
||||
tmp_mode
|
||||
tmp_numbots
|
||||
tmp_wc
|
||||
]
|
||||
|
||||
addListOnQuit $on_quit_aliases
|
||||
+3
-1
@@ -363,4 +363,6 @@ customclaimadminscript = [
|
||||
|
||||
run dyngamma
|
||||
|
||||
run tutorial
|
||||
run tutorial
|
||||
|
||||
run on_quit
|
||||
@@ -1378,6 +1378,27 @@ echo foo
|
||||
</example>
|
||||
</examples>
|
||||
</scriptalias>
|
||||
|
||||
<scriptalias name="addOnQuit">
|
||||
<description>Execute a command or block of code on quit.</description>
|
||||
<references>
|
||||
<identifierReference identifier="addListOnQuit"/>
|
||||
</references>
|
||||
</scriptalias>
|
||||
|
||||
<scriptalias name="addListOnQuit">
|
||||
<description>Deletes a list of aliases (from saved.cfg) on quit.</description>
|
||||
<examples>
|
||||
<example>
|
||||
<code><![CDATA[addListOnQuit "a b c"]]></code>
|
||||
<explanation>Deletes aliases a, b, and c from existance and saved.cfg upon quit.</explanation>
|
||||
</example>
|
||||
</examples>
|
||||
<value token="L" description="the list of aliases to delete"/>
|
||||
<references>
|
||||
<identifierReference identifier="addOnQuit"/>
|
||||
</references>
|
||||
</scriptalias>
|
||||
|
||||
<scriptalias name="onDeathSelf">
|
||||
<description>This will be executed each time the player dies.</description>
|
||||
|
||||
Reference in New Issue
Block a user