mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Finished documenting scripting system.
This means the documentation is DONE (yay!) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@606 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
Function: primary_choice
|
||||
|
||||
--Usage--
|
||||
> primary_choice(some_choice_value)
|
||||
|
||||
Returns the name of the 'top level' choice selected.
|
||||
|
||||
For example if a [[type:field|choice field]] is declared with the [[type:choice]]s:
|
||||
>choice:
|
||||
> name: large
|
||||
> choice: red
|
||||
> choice: blue
|
||||
>choice:
|
||||
> name: small
|
||||
> group choice: just small
|
||||
> choice: green
|
||||
> choice: yellow
|
||||
Then @primary_choice("large red") == "large"@.
|
||||
|
||||
This function is used to keep [[type:statiscs_dimension|statistics]] cleaner by not having columns for all possible sub choices.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:string]] Choice value to look at.
|
||||
|
||||
--Examples--
|
||||
> primary_choice("large red") == "large"
|
||||
> primary_choice("large") == "large"
|
||||
> primary_choice("small green") == "small"
|
||||
@@ -19,6 +19,7 @@ Parts
|
||||
| @"<wxy>"@ @"xy"@ Selects the characters from the input, but only once.
|
||||
@"<xy>"@ is the same as @"<x><y>"@.
|
||||
| @"[wxy]"@ @"yyyxx"@ Selects the given characters, but keep them in the same order as in the input.
|
||||
| @"(xwz)"@ @"zzxx"@ The same as @"cycle(xyz)"@.
|
||||
| @"ordered(wxy)"@ @"xxyyy"@ The same as just @"wxy"@.
|
||||
| @"once(wxy)"@ @"xy"@ The same as @"<wxy>"@.
|
||||
| @"mixed(wxy)"@ @"yyyxx"@ The same as @"[wxy]"@.
|
||||
|
||||
Reference in New Issue
Block a user