Date: 2016/08/11 17:18:34 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
DUL_ColorList:
type: procedure
debug: false
DUL:
author:
- Anthony
name:
- ColorList
description:
- Return colors from input or just list all colors
usage:
- <proc[DUL_colorlist].context[<list/match|input>]>
example:
- narrate <proc[DUL_colorlist].context[list]>
- narrate <proc[DUL_colorlist].context[match|blu]>
colors:
black: 0
dark_blue: 1
dark_green: 2
dark_aqua: 3
dark_red: 4
dark_purple: 5
gold: 6
gray: 7
dark_gray: 8
blue: 9
green: a
aqua: b
red: c
light_purple: d
yellow: e
white: f
magic: k
bold: l
strikethrough: m
underline: n
italic: o
reset: r
script:
- define colors '<script.list_keys[colors]>'
- choose '<def[1]>':
- case 'list':
- define list 'li@'
- foreach '<def[colors]>':
- define list '<def[list].include[<el@val[&<script.yaml_key[colors.%value%]>]> %value%]>'
- determine '<def[list]>'
- case 'match':
- determine '<def[colors].get[<def[colors].find_all_partial[%2%].get[1]>]>'