Fenris Wolf commited on 2016-05-22 12:30:14
Zeige 8 geänderte Dateien mit 120 Einfügungen und 15 Löschungen.
... | ... |
@@ -0,0 +1,16 @@ |
1 |
+digraph |
|
2 |
+{ |
|
3 |
+ graph [fontname="monospace"]; |
|
4 |
+ |
|
5 |
+ node [fontname="monospace" shape="box" style="filled" fillcolor="0.4+0.8+0.8"]; |
|
6 |
+ node_kliento [label="kliento"]; |
|
7 |
+ node_kromajxo [label="kromajxo"]; |
|
8 |
+ node_evento_eniga [label="evento_eniga"]; |
|
9 |
+ node_evento_eliga [label="evento_eliga"]; |
|
10 |
+ |
|
11 |
+ edge [fontname="monospace"]; |
|
12 |
+ node_kromajxo -> node_kliento [arrowhead="diamond"]; |
|
13 |
+ node_kliento -> node_evento_eniga [arrowhead="normal" label="ricevas"]; |
|
14 |
+ node_kliento -> node_evento_eliga [arrowhead="normal" label="sendas"]; |
|
15 |
+} |
|
16 |
+ |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
2 |
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" |
|
3 |
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
|
4 |
+<!-- Generated by graphviz version 2.38.0 (20140413.2041) |
|
5 |
+ --> |
|
6 |
+<!-- Title: %3 Pages: 1 --> |
|
7 |
+<svg width="258pt" height="204pt" |
|
8 |
+ viewBox="0.00 0.00 258.00 204.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
9 |
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 200)"> |
|
10 |
+<title>%3</title> |
|
11 |
+<polygon fill="white" stroke="none" points="-4,4 -4,-200 254,-200 254,4 -4,4"/> |
|
12 |
+<!-- node_kliento --> |
|
13 |
+<g id="node1" class="node"><title>node_kliento</title> |
|
14 |
+<polygon fill="#28cc6a" stroke="black" points="162,-123 88,-123 88,-87 162,-87 162,-123"/> |
|
15 |
+<text text-anchor="middle" x="125" y="-101.3" font-family="monospace" font-size="14.00">kliento</text> |
|
16 |
+</g> |
|
17 |
+<!-- node_evento_eniga --> |
|
18 |
+<g id="node3" class="node"><title>node_evento_eniga</title> |
|
19 |
+<polygon fill="#28cc6a" stroke="black" points="116,-36 7.10543e-15,-36 7.10543e-15,-0 116,-0 116,-36"/> |
|
20 |
+<text text-anchor="middle" x="58" y="-14.3" font-family="monospace" font-size="14.00">evento_eniga</text> |
|
21 |
+</g> |
|
22 |
+<!-- node_kliento->node_evento_eniga --> |
|
23 |
+<g id="edge2" class="edge"><title>node_kliento->node_evento_eniga</title> |
|
24 |
+<path fill="none" stroke="black" d="M111.442,-86.799C101.815,-74.5865 88.735,-57.9921 77.9247,-44.2776"/> |
|
25 |
+<polygon fill="black" stroke="black" points="80.4775,-41.8623 71.5383,-36.1754 74.98,-46.1957 80.4775,-41.8623"/> |
|
26 |
+<text text-anchor="middle" x="125" y="-57.8" font-family="monospace" font-size="14.00">ricevas</text> |
|
27 |
+</g> |
|
28 |
+<!-- node_evento_eliga --> |
|
29 |
+<g id="node4" class="node"><title>node_evento_eliga</title> |
|
30 |
+<polygon fill="#28cc6a" stroke="black" points="250,-36 134,-36 134,-0 250,-0 250,-36"/> |
|
31 |
+<text text-anchor="middle" x="192" y="-14.3" font-family="monospace" font-size="14.00">evento_eliga</text> |
|
32 |
+</g> |
|
33 |
+<!-- node_kliento->node_evento_eliga --> |
|
34 |
+<g id="edge3" class="edge"><title>node_kliento->node_evento_eliga</title> |
|
35 |
+<path fill="none" stroke="black" d="M142.354,-86.6877C147.574,-81.1959 153.189,-74.9908 158,-69 164.113,-61.388 170.271,-52.7079 175.636,-44.7404"/> |
|
36 |
+<polygon fill="black" stroke="black" points="178.723,-46.4166 181.31,-36.1424 172.88,-42.5608 178.723,-46.4166"/> |
|
37 |
+<text text-anchor="middle" x="193" y="-57.8" font-family="monospace" font-size="14.00">sendas</text> |
|
38 |
+</g> |
|
39 |
+<!-- node_kromajxo --> |
|
40 |
+<g id="node2" class="node"><title>node_kromajxo</title> |
|
41 |
+<polygon fill="#28cc6a" stroke="black" points="166.5,-196 83.5,-196 83.5,-160 166.5,-160 166.5,-196"/> |
|
42 |
+<text text-anchor="middle" x="125" y="-174.3" font-family="monospace" font-size="14.00">kromajxo</text> |
|
43 |
+</g> |
|
44 |
+<!-- node_kromajxo->node_kliento --> |
|
45 |
+<g id="edge1" class="edge"><title>node_kromajxo->node_kliento</title> |
|
46 |
+<path fill="none" stroke="black" d="M125,-159.813C125,-152.4 125,-143.52 125,-135.131"/> |
|
47 |
+<polygon fill="black" stroke="black" points="125,-135.029 121,-129.029 125,-123.029 129,-129.029 125,-135.029"/> |
|
48 |
+</g> |
|
49 |
+</g> |
|
50 |
+</svg> |
... | ... |
@@ -97,6 +97,7 @@ abstract class klaso_kliento |
97 | 97 |
"-- nomo: " + ero.kromajxo.nomo_legi(), |
98 | 98 |
"-- auxtoro: " + ero.kromajxo.auxtoro_legi(), |
99 | 99 |
"-- priskribo: " + ero.kromajxo.priskribo_legi(), |
100 |
+ "-- uzo: " + ero.kromajxo.uzo_legi(), |
|
100 | 101 |
"-- aktiva: " + (ero.aktiva ? "jes" : "ne"), |
101 | 102 |
]; |
102 | 103 |
enhavoj.forEach(enhavo => that.eligi(new klaso_evento_eliga_mesagxo(celo, null, enhavo))); |
... | ... |
@@ -165,6 +166,11 @@ abstract class klaso_kliento |
165 | 166 |
); |
166 | 167 |
} |
167 | 168 |
}, |
169 |
+ "elmontri_helpon": function (celo : string) : void |
|
170 |
+ { |
|
171 |
+ that.eligi(new klaso_evento_eliga_mesagxo(celo, null, "'!kromajxo listigi': listigi la nomojn de cxiuj kromajxoj kaj elmontri cxu ili estas sxaltitaj")); |
|
172 |
+ that.eligi(new klaso_evento_eliga_mesagxo(celo, null, "'!kromajxo detaloj [nomo]': elmontri detalojn pri la kromajxo kun la nomo [nomo]")); |
|
173 |
+ }, |
|
168 | 174 |
} |
169 | 175 |
) |
170 | 176 |
); |
... | ... |
@@ -43,6 +43,12 @@ abstract class klaso_kromajxo |
43 | 43 |
protected priskribo : string; |
44 | 44 |
|
45 | 45 |
|
46 |
+ /** |
|
47 |
+ * @author fenris |
|
48 |
+ */ |
|
49 |
+ protected uzo : string; |
|
50 |
+ |
|
51 |
+ |
|
46 | 52 |
/** |
47 | 53 |
* @author fenris |
48 | 54 |
*/ |
... | ... |
@@ -52,7 +58,14 @@ abstract class klaso_kromajxo |
52 | 58 |
/** |
53 | 59 |
* @author fenris |
54 | 60 |
*/ |
55 |
- public constructor(identigilo : string = null, nomo : string = null, priskribo : string = null, auxtoro : string = null) |
|
61 |
+ public constructor |
|
62 |
+ ( |
|
63 |
+ identigilo : string = null, |
|
64 |
+ nomo : string = null, |
|
65 |
+ priskribo : string = null, |
|
66 |
+ uzo : string = null, |
|
67 |
+ auxtoro : string = null |
|
68 |
+ ) |
|
56 | 69 |
{ |
57 | 70 |
if (identigilo == null) |
58 | 71 |
{ |
... | ... |
@@ -62,6 +75,7 @@ abstract class klaso_kromajxo |
62 | 75 |
this.identigilo = identigilo; |
63 | 76 |
this.nomo = nomo; |
64 | 77 |
this.priskribo = priskribo; |
78 |
+ this.uzo = uzo; |
|
65 | 79 |
this.auxtoro = auxtoro; |
66 | 80 |
} |
67 | 81 |
|
... | ... |
@@ -93,6 +107,15 @@ abstract class klaso_kromajxo |
93 | 107 |
} |
94 | 108 |
|
95 | 109 |
|
110 |
+ /** |
|
111 |
+ * @author fenris |
|
112 |
+ */ |
|
113 |
+ public uzo_legi() : string |
|
114 |
+ { |
|
115 |
+ return this.uzo; |
|
116 |
+ } |
|
117 |
+ |
|
118 |
+ |
|
96 | 119 |
/** |
97 | 120 |
* @author fenris |
98 | 121 |
*/ |
... | ... |
@@ -53,11 +53,12 @@ class klaso_kromajxo_ekstera extends klaso_kromajxo |
53 | 53 |
identigilo : string = null, |
54 | 54 |
nomo : string = null, |
55 | 55 |
priskribo : string = null, |
56 |
+ uzo : string = null, |
|
56 | 57 |
auxtoro : string = null, |
57 | 58 |
reagi_ : (enigo_kruda : Object, eligi : (eligo_kruda : Object)=>void)=>void |
58 | 59 |
) |
59 | 60 |
{ |
60 |
- super(identigilo, nomo, priskribo, auxtoro); |
|
61 |
+ super(identigilo, nomo, priskribo, uzo, auxtoro); |
|
61 | 62 |
this.reagi_ = reagi_; |
62 | 63 |
this.vojo = null; |
63 | 64 |
this.memoro = {}; |
... | ... |
@@ -83,6 +84,7 @@ class klaso_kromajxo_ekstera extends klaso_kromajxo |
83 | 84 |
{ |
84 | 85 |
that.nomo = datumoj["nomo"]; |
85 | 86 |
that.priskribo = datumoj["priskribo"]; |
87 |
+ that.uzo = datumoj["uzo"]; |
|
86 | 88 |
that.auxtoro = datumoj["auxtoro"]; |
87 | 89 |
that.reagi_ = datumoj["reagi"]; |
88 | 90 |
fino(null); |
... | ... |
@@ -154,6 +156,7 @@ class klaso_kromajxo_ekstera extends klaso_kromajxo |
154 | 156 |
datumoj["identigilo"], |
155 | 157 |
datumoj["nomo"], |
156 | 158 |
datumoj["priskribo"], |
159 |
+ datumoj["uzo"], |
|
157 | 160 |
datumoj["auxtoro"], |
158 | 161 |
datumoj["reagi"] |
159 | 162 |
); |
... | ... |
@@ -26,6 +26,7 @@ type tipo_agoj = { |
26 | 26 |
sxalti ?: (identigilo : string, aktiva ?: boolean, celo ?: string)=>void; |
27 | 27 |
resxargi ?: (identigilo : string, celo ?: string)=>void; |
28 | 28 |
aldoni ?: (nomo : string, celo ?: string)=>void; |
29 |
+ elmontri_helpon ?: (celo ?: string)=>void; |
|
29 | 30 |
}; |
30 | 31 |
|
31 | 32 |
|
... | ... |
@@ -50,12 +51,13 @@ class klaso_kromajxo_stirado extends klaso_kromajxo |
50 | 51 |
/** |
51 | 52 |
* @author fenris |
52 | 53 |
*/ |
53 |
- public constructor( |
|
54 |
+ public constructor |
|
55 |
+ ( |
|
54 | 56 |
permesuloj : Array<string> = new Array<string>(), |
55 | 57 |
agoj : tipo_agoj |
56 | 58 |
) |
57 | 59 |
{ |
58 |
- super("stirado", "Stirado", "stiras aliajn kromajxojn kaj elmontras informojn pri ili", "fenris"); |
|
60 |
+ super("stirado", "Stirado", "stiras aliajn kromajxojn kaj elmontras informojn pri ili", null, "fenris"); |
|
59 | 61 |
this.permesuloj = permesuloj; |
60 | 62 |
this.agoj = agoj; |
61 | 63 |
} |
... | ... |
@@ -96,41 +98,45 @@ class klaso_kromajxo_stirado extends klaso_kromajxo |
96 | 98 |
let resto : string = enigo_kruda["parametroj"]["enhavo"]; |
97 | 99 |
[ |
98 | 100 |
{ |
99 |
- "skemoj": [new RegExp("^!\\W*(?:kanalo|k) (?:anigxi|a) ((?:#|\\w)+)$")], |
|
101 |
+ "skemoj": [new RegExp("^!\\W*(?:kanalo|k) (?:anigxi|a|>) ((?:#|\\w)+)$")], |
|
100 | 102 |
"ago": x => ujumi(() => this.agoj.anigxi(x[0], true)), |
101 | 103 |
}, |
102 | 104 |
{ |
103 |
- "skemoj": [new RegExp("^!\\W*(?:kanalo|k) (?:malanigxi|m) ((?:#|\\w)+)$")], |
|
105 |
+ "skemoj": [new RegExp("^!\\W*(?:kanalo|k) (?:malanigxi|m|<) ((?:#|\\w)+)$")], |
|
104 | 106 |
"ago": x => ujumi(() => this.agoj.anigxi(x[0], false)), |
105 | 107 |
}, |
106 | 108 |
{ |
107 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:listigi|l)$")/*, new RegExp("$\|")*/], |
|
109 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:listigi|l)$")/*, new RegExp("$\|")*/], |
|
108 | 110 |
"ago": x => this.agoj.listigi(enigo_kruda["parametroj"]["fonto"]), |
109 | 111 |
}, |
110 | 112 |
{ |
111 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:detaloj|d) (\\w+)$")/*, new RegExp("$#(\\w+)")*/], |
|
112 |
- "ago": x => ujumi(() => this.agoj.detaloj(x[0], enigo_kruda["parametroj"]["fonto"])), |
|
113 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:detaloj|d) (\\w+)$")/*, new RegExp("$#(\\w+)")*/], |
|
114 |
+ "ago": x => this.agoj.detaloj(x[0], enigo_kruda["parametroj"]["fonto"]), |
|
113 | 115 |
}, |
114 | 116 |
{ |
115 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:sxalti|s) (\\w+)$")/*, new RegExp("$~(\\w+)")*/], |
|
117 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:sxalti|s|toggle|t|%) (\\w+)$")/*, new RegExp("$~(\\w+)")*/], |
|
116 | 118 |
"ago": x => ujumi(() => this.agoj.sxalti(x[0], undefined, enigo_kruda["parametroj"]["fonto"])), |
117 | 119 |
}, |
118 | 120 |
{ |
119 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:aktivigi|a) (\\w+)$")/*, new RegExp("$\+(\\w+)")*/], |
|
121 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:aktivigi|a|\\+) (\\w+)$")/*, new RegExp("$\+(\\w+)")*/], |
|
120 | 122 |
"ago": x => ujumi(() => this.agoj.sxalti(x[0], true, enigo_kruda["parametroj"]["fonto"])), |
121 | 123 |
}, |
122 | 124 |
{ |
123 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:malaktivigi|m) (\\w+)$")/*, new RegExp("$-(\\w+)")*/], |
|
125 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:malaktivigi|m|-) (\\w+)$")/*, new RegExp("$-(\\w+)")*/], |
|
124 | 126 |
"ago": x => ujumi(() => this.agoj.sxalti(x[0], false, enigo_kruda["parametroj"]["fonto"])), |
125 | 127 |
}, |
126 | 128 |
{ |
127 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:resxargi|r) (\\w+)$")/*, new RegExp("$#(\\w+)")*/], |
|
129 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:resxargi|r|\\$) (\\w+)$")/*, new RegExp("$#(\\w+)")*/], |
|
128 | 130 |
"ago": x => ujumi(() => this.agoj.resxargi(x[0], enigo_kruda["parametroj"]["fonto"])), |
129 | 131 |
}, |
130 | 132 |
{ |
131 |
- "skemoj": [new RegExp("^!\\W*(?:kromajxo|x) (?:aldoni|p) (\\w+)$")/*, new RegExp("$\*(\\w+)")*/], |
|
133 |
+ "skemoj": [new RegExp("^!\\W*(?:kromaĵo|kromajxo|krom|x) (?:aldoni|\\*) (\\w+)$")/*, new RegExp("$\*(\\w+)")*/], |
|
132 | 134 |
"ago": x => ujumi(() => that.agoj.aldoni(x[0], enigo_kruda["parametroj"]["fonto"])), |
133 | 135 |
}, |
136 |
+ { |
|
137 |
+ "skemoj": [new RegExp("^!\\W*(?:helpo|help|h)$")], |
|
138 |
+ "ago": x => this.agoj.elmontri_helpon(enigo_kruda["parametroj"]["fonto"]), |
|
139 |
+ }, |
|
134 | 140 |
].forEach |
135 | 141 |
( |
136 | 142 |
function (ero : Object) : void |
137 | 143 |