-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsolconfig.py
46 lines (38 loc) · 988 Bytes
/
solconfig.py
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
import os
import inspect
def get_root_dir():
pth = os.path.abspath(inspect.getsourcefile(lambda x: x))
return os.path.dirname(pth)
data_path = "data"
data_files = {
"general": "ep.json",
"lifepath": "lifepath.json",
"packages": "packages.json",
"morphs": "morphs.json",
"gear": "gear.json",
"psi": "psi.json",
"traits": "traits.json",
}
def get_data_file(name):
fn = data_files.get(name)
if fn is None:
return None
fpath = os.path.join(get_root_dir(), data_path, fn)
return open(fpath)
data_types = {
"general": ["values", "table"],
"package": ["values", "package"],
"branching": ["values", "desc", "action"],
"background": ["values", "desc", "package", "morph", "next"],
"event": ["values", "table"]
}
css_classes = {
'active': 'red',
'knowledge': 'violet',
'any': 'grey',
'positive': 'green',
'negative': 'red',
'passive': 'green',
'chi': 'yellow',
'gamma': 'red',
}