mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implement CSV / TSV import (#45)
- add csv/tsv importer - add `make_map` script function - add `alt name` field property - add `construction script` field property - add `construction script` game property
This commit is contained in:
@@ -11,6 +11,7 @@ These functions are built into the program, other [[type:function]]s can be defi
|
||||
| [[fun:to_color]] Convert any value to a [[type:color]]
|
||||
| [[fun:to_image]] Convert any value to an [[type:image]]
|
||||
| [[fun:to_date]] Convert any value to a [[type:date]]
|
||||
| [[fun:make_map]] Create a [[type:map]] from two [[type:list]]s
|
||||
| [[fun:type_name]] Get the type of a value
|
||||
|
||||
! Numbers <<<
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
Function: make_map
|
||||
|
||||
--Usage--
|
||||
> make_map(keys: some_list, values: some_list)
|
||||
|
||||
Creates a new map. Converts the elements in keys to strings, and uses them as keys for the elements in values.
|
||||
|
||||
Produces a warning if keys and values are not of the same size.
|
||||
nil keys will be ignored.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @keys@ [[type:list]] List of keys.
|
||||
| @values@ [[type:list]] List of values.
|
||||
|
||||
--Examples--
|
||||
> make_map(keys:["apple", "durian", 3], values:["good", "bad", "not edible"]) == ["apple":"good", "durian":"bad", "3":"not edible"]
|
||||
Reference in New Issue
Block a user