mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Now all regex functions use ScriptRule.
The *_rule functions can now be considered deprecated Documented this by removing mentions of the rule functions, except for a mention of backwards compatibility. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@997 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -23,12 +23,15 @@ Instead define a function in the init script.
|
||||
>field:
|
||||
> script: flubble_script()
|
||||
|
||||
--Use rule form--
|
||||
If a function is available in [[script:rule form]] use it where possible.
|
||||
--Use default arguments--
|
||||
|
||||
Many rules can be chained together using the @+@ operator.
|
||||
Many functions can be chained together using the @+@ operator.
|
||||
For these functions [[script:default arguments]] can be given.
|
||||
Have a look at @text_filter@ in the magic game file for an example.
|
||||
|
||||
Using default arguments is especially important for functions that work on [[type:regex|regular expressions]],
|
||||
since it allows MSE to compile the regular expressions just once instead of for every call.
|
||||
|
||||
--Don't be afraid to nest--
|
||||
Don't be afraid to nest complex things like @if@ expressions inside other expressions.
|
||||
For example the blend scripts for magic use:
|
||||
|
||||
Reference in New Issue
Block a user