mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Added word lists for choosing things like card type;
Added 'in_place' pattern to spec_sort git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@616 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -35,6 +35,9 @@ Parts
|
||||
| @"pattern(.z. xyz)"@ @"yzz"@ Selects all things that match the pattern, where @"."@ is a wildcard.
|
||||
The things matching the wildcards are then sorted using the given pattern (separated by a space), and subsituted back in.
|
||||
So in <tt>"zzyyxxy"</tt> the pattern matches <tt>"<b>zzy</b>xxy"</tt> with wildcards <tt>"zy"</tt> these sort as <tt>"yz"</tt> and in the pattern this becomes <tt>"yzz"</tt>.
|
||||
| @"in_place(yz)"@ @"yyyzxxz"@ Sort everything with the given pattern, and insert the remaining characters in their orignal places.<br/>
|
||||
For example, in @"zzyyxxy"@ we match <tt>y</tt> and <tt>z</tt>, leaving @"....xx."@.
|
||||
The result of the pattern is @"yyyzz"@, subsituting that back in gives @"yyyzxxz"@.
|
||||
|
||||
The parts are read from left to right, each part that matches something removes it from the input, so for example
|
||||
> sort_text(order: "xx")
|
||||
|
||||
@@ -40,6 +40,7 @@ Such a package contains a [[file:format|data file]] called <tt>game</tt> that ha
|
||||
| @keyword modes@ [[type:list]] of [[type:keyword mode]]s Choices for the 'mode' property of keywords.
|
||||
| @keyword parameter types@ [[type:list]] of [[type:keyword param type]]s Types of parameters available to keywords.
|
||||
| @keywords@ [[type:list]] of [[type:keyword]]s Standard keywords for this game.
|
||||
| @word lists@ [[type:list]] of [[type:word list]]s Word lists that can be used by text fields.
|
||||
|
||||
--Examples--
|
||||
Look at the game files in the standard MSE distribution for examples.
|
||||
|
||||
@@ -37,6 +37,8 @@ This is written as the character with code 1 in files.
|
||||
Inserting this tag manually will confuse that function!<br/>
|
||||
This tag can never be selected, and its contents can not be edited.
|
||||
| @"<sep-soft>"@ Like @"<sep>"@, only hidden. This is inserted by [[fun:combined_editor]]
|
||||
| @"<word-list-?>"@ Indicate that the text inside the tag should be selected from a [[type:word list]].
|
||||
The <tt>?</tt> must be the name of a word list in the game.
|
||||
| any other tag Other tags are ignored.
|
||||
|
||||
--Related functions--
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
Data type: word list
|
||||
|
||||
A list of words. Used for drop down lists in the text editor, for example for card types.
|
||||
|
||||
--Properties--
|
||||
! Property Type Default Description
|
||||
| @name@ [[type:string]] ''Required'' Name of this word list, refered to using a @"<word-list-...>"@ tag.
|
||||
| @words@ [[type:list]] of [[type:word list word]]s ''Required'' The words in the list
|
||||
|
||||
--Example--
|
||||
>word list:
|
||||
> name: type
|
||||
> word: Creature
|
||||
> word: Spell
|
||||
> word: Artifact
|
||||
This can be used with for example:
|
||||
> @"<word-list-type>Creature</word-list-type>"@
|
||||
Which gives the creature choice, and that can be changed with a drop down list.
|
||||
@@ -0,0 +1,18 @@
|
||||
Data type: word list word
|
||||
|
||||
A word in a [[type:word list]].
|
||||
|
||||
--Properties--
|
||||
! Property Type Default Description
|
||||
| @name@ [[type:string]] ''Required'' The word
|
||||
| @line below@ [[type:boolean]] @false@ Display a line below this item in the list?
|
||||
| @words@ [[type:list]] of [[type:word list word]]s A submenu
|
||||
|
||||
A word can also be given in a short form, in that case only the name is specified.
|
||||
|
||||
--Example--
|
||||
In short form:
|
||||
>word: xyz
|
||||
Is the same as:
|
||||
>word:
|
||||
> name: xyz
|
||||
Reference in New Issue
Block a user