-
Notifications
You must be signed in to change notification settings - Fork 0
/
materials.py
executable file
·91 lines (85 loc) · 2.38 KB
/
materials.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# from numba import njit
# from numba.typed import Dict, List
def materials(material):
if type(material) == int:
return mat[material]
else:
return material_dict[material]
def material_id(string):
return material_dict[string]['number']
mat = [
{
"name": 'air',
"number": 0,
# can be seen through
"opaque": False,
# can be walked through
"blocking": False,
"structure": 0,
"effect": None,
# items below here are special and will rarely differ from above blocking and opacity
# these three opacities are different "sight" modes with different tradeoffs and counters
"opaque_thermal": False,
"opaque_sonar": False,
"opaque_radar": False,
# cant see through in the astral, most blocking materials and spell barriers
"opaque_astral": False,
# cant see through on the net, very few things
"opaque_net": False,
# only living biological things block astral movement
"blocking_astral": False,
# only faraday cages block net movement
"blocking_net": False,
},
{
"name": 'glass',
"number": 1,
"opaque": False,
"blocking": True,
"structure": 2,
"effect": None,
"opaque_thermal": False,
"opaque_sonar": True,
"opaque_radar": False,
"opaque_astral": True,
"opaque_net": False,
"blocking_astral": False,
"blocking_net": False,
},
{
"name": 'smoke',
"number": 2,
"opaque": True,
"blocking": False,
"structure": 0,
"effect": None,
"opaque_thermal": False,
"opaque_sonar": False,
"opaque_radar": False,
"opaque_astral": False,
"opaque_net": False,
"blocking_astral": False,
"blocking_net": False,
},
{
"name": 'concrete',
"number": 3,
"opaque": True,
"blocking": True,
"structure": 12,
"effect": None,
"opaque_thermal": True,
"opaque_sonar": True,
"opaque_radar": False,
"opaque_astral": True,
"opaque_net": False,
"blocking_astral": False,
"blocking_net": False,
},
]
material_dict = {}
for m in mat:
# n = Dict()
# for key, item in m.items():
# n[key] = item
material_dict[m['name']] = m