-
Notifications
You must be signed in to change notification settings - Fork 2
/
statInit.js
163 lines (155 loc) · 5.46 KB
/
statInit.js
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
//ОТРИСОВКА ГРАФИКИ ПЛАНЕТЫ
//АТМОСФЕРА
//Выбираем случайные облака
//DRAWING PLANET GRAPHICS
//ATMOSPHERE
//Select random clouds
document.getElementById("clouds").style.background = "url(assets/textures/atmosphere/atm"+getRandomInt(1,8).toString()+".png) repeat-x";
switch(cPlanet.atmosphere) {
case 'Breathable':
case 'Marginal':
case 'Non-breathable':
switch(cPlanet.water) {
case 'Oceans':
case 'Ice caps':
case 'Ice-covered surface':
case 'Planet-wide ocean':
document.getElementById("clouds").style.opacity = getRandomInt(5,10)/10;
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(3, 172, 255, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //Blue halo
break;
case 'Trace':
case 'None':
document.getElementById("clouds").style.opacity = 0;
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(255, 3, 3, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //Red halo
break;
default:
break;
};
break;
case 'Toxic':
switch(cPlanet.water) {
case 'Oceans':
case 'Ice caps':
case 'Ice-covered surface':
case 'Planet-wide ocean':
document.getElementById("clouds").style.opacity = getRandomInt(5,10)/10;
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(23, 255, 3, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //Green halo
break;
case 'Trace':
case 'None':
document.getElementById("clouds").style.opacity = 0;
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(23, 255, 3, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //Green halo
break;
default:
break;
};
break;
case 'Corrosive':
switch(cPlanet.water) {
case 'Oceans':
case 'Ice caps':
case 'Ice-covered surface':
case 'Planet-wide ocean':
document.getElementById("clouds").style.opacity = getRandomInt(5,10)/10;
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(255, 98, 3, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //Orange halo
break;
case 'Trace':
case 'None':
document.getElementById("clouds").style.opacity = 0;
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(255, 98, 3, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //Orange halo
break;
default:
break;
};
break;
case 'None':
document.getElementById("clouds").style.opacity = "0";
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(255, 255, 255, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //White halo
break;
default:
document.getElementById("clouds").style.opacity = "0";
document.getElementById("planetAnimation").style.boxShadow = "0 0 60px -20px rgba(255, 255, 255, 0.72), -14px -15px 40px -10px rgba(255, 238, 191, 0.23)"; //White halo
break;
/* OLD
switch(cPlanet.atmosphere) {
case 'Breathable':
document.getElementById("clouds").style.opacity = "0.9";
break;
case 'Marginal':
document.getElementById("clouds").style.opacity = "0.5";
break;
case 'None':
document.getElementById("clouds").style.opacity = "0";
break;
default:
document.getElementById("clouds").style.opacity = "0.3";
break;
};
*/
//ВОДА
switch(cPlanet.water) {
case 'Oceans':
document.getElementById("planet").style.background = "url(assets/textures/BarrenWintWater/BW"+getRandomInt(1,10).toString()+".png) repeat-x";
break;
case 'Ice caps':
document.getElementById("planet").style.background = "url(assets/textures/Barren/B"+getRandomInt(1,1).toString()+".png) repeat-x";
break;
case 'Ice-covered surface':
document.getElementById("planet").style.background = "url(assets/textures/Ice/Ice_"+getRandomInt(1,10).toString()+".png) repeat-x";
break;
case 'Planet-wide ocean':
document.getElementById("planet").style.background = "url(assets/textures/Ocean/O"+getRandomInt(1,3).toString()+".png) repeat-x";
break;
case 'Trace':
document.getElementById("planet").style.background = "url(assets/textures/Barren/B"+getRandomInt(1,1).toString()+".png) repeat-x";
break;
case 'None':
document.getElementById("planet").style.background = "url(assets/textures/Barren/B"+getRandomInt(1,1).toString()+".png) repeat-x";
break;
default:
break;
};
//ТЕМПЕРАТУРА
//temperature
switch(cPlanet.temperature) {
case 'Moderate':
break;
case 'Hot':
break;
case 'Cold':
break;
case 'Very Hot':
break;
case 'Very Cold':
break;
default:
break;
};
//ГРАВИТАЦИЯ
//GRAVITY
switch(cPlanet.gravity) {
case 'Moderate':
break;
case 'High':
break;
case 'Low':
break;
case 'Very High':
break;
case 'Very Low':
break;
default:
break;
};
//РЕСУРСЫ
//Resource
switch(cPlanet.resources) {
case 'Rich':
break;
case 'Poor':
break;
case 'None':
break;
default:
break;
};