fixes/updates
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6226 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -336,6 +336,7 @@ 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.];
|
||||
docargument [A] [the command or block of code to execute] [] [0];
|
||||
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.];
|
||||
|
||||
+4
-1
@@ -1,5 +1,6 @@
|
||||
// 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 = [
|
||||
@@ -21,6 +22,8 @@ on_quit_aliases = [
|
||||
tmp_mode
|
||||
tmp_numbots
|
||||
tmp_wc
|
||||
alias_list // Last for a reason
|
||||
]
|
||||
|
||||
addListOnQuit $on_quit_aliases
|
||||
addListOnQuit $on_quit_aliases
|
||||
addOnQuit [ delalias addListOnQuit; delalias on_quit_aliases ]
|
||||
@@ -1381,6 +1381,7 @@ echo foo
|
||||
|
||||
<scriptalias name="addOnQuit">
|
||||
<description>Execute a command or block of code on quit.</description>
|
||||
<value token="A" description="the command or block of code to execute"/>
|
||||
<references>
|
||||
<identifierReference identifier="addListOnQuit"/>
|
||||
</references>
|
||||
|
||||
Reference in New Issue
Block a user