This repository was archived by the owner on Jun 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
361 lines (350 loc) · 14.5 KB
/
Copy pathindex.html
File metadata and controls
361 lines (350 loc) · 14.5 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!DOCTYPE html>
<html lang="en-us" data-bs-core="modern" data-bs-theme="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Reprocessing Calculator</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/Halfmoon/2.0.1/css/halfmoon.min.css"
integrity="sha512-g9GEUJMl/pfimBhAYQmiCb+6Drr+sp8tPllURqR+dcbiHfm+0lAX2fWhZsMHxcQY3/48mUHJs4onDsptohS1Kw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<!--
<link href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.1/css/cores/halfmoon.modern.css" rel="stylesheet"
integrity="sha256-DD6elX+jPmbFYPsGvzodUv2+9FHkxHlVtQi0/RJVULs=" crossorigin="anonymous">
-->
<link
href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.1/css/cores/halfmoon.modern.css"
rel="stylesheet"
/>
</head>
<body
class="container-fluid bg-body d-flex w-100 h-100 flex-column text-center text-body p-0"
>
<header class="jumbotron p-0 bg-gradient">
<h1 class="title display-1">Reprocessing Calculator</h1>
</header>
<main class="container bg-body-secondary border rounded p-3">
<article class="bg-primary p-1 rounded-1">
<section class="bg-body-tertiary p-1 rounded-5">
<form class="form bg-body-tertiary bg-gradient rounded-0 p-0">
<label for="veldspar" class="form-label d-inline">Veldspar:</label>
<input
type="number"
class="form-control d-inline p-1"
id="veldspar"
placeholder="m^3"
/>
</form>
<figure class="container">
<input
type="button"
class="btn btn-primary bg-gradient position-relative specific-h-50 specific-w-50"
data-bs-toggle="offcanvas"
data-bs-target="#table-panel"
value="Table"
/>
<input
type="button"
class="btn btn-primary bg-gradient position-relative specific-h-50 specific-w-50"
data-bs-toggle="offcanvas"
data-bs-target="#input-panel"
value="Input"
/>
</figure>
</section>
</article>
<!-- Input Form -->
<aside
id="input-panel"
data-bs-scroll="true"
data-bs-backdrop="false"
tabindex="-1"
aria-labelledby="input-panel"
class="offcanvas offcanvas-end card bg-primary rounded-0 rounded-top-5 border-start shadow pt-4 pb-0 ps-1 pe-0"
style="border-top-right-radius: 0 !important"
>
<header
class="offcanvas-header bg-body-secondary rounded-top-5"
style="border-top-right-radius: 0 !important"
>
<h5 class="offcanvas-title" id="panel-1-title">Input</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="offcanvas"
aria-label="Close"
></button>
</header>
<article
class="offcanvas-body bg-body-secondary bg-gradient rounded-0"
style="border-top-left-radius: 0 !important"
>
<form id="form" class="form bg-body-tertiary bg-gradient rounded p-1">
<fieldset class="card border-0 bg-gradient p-1">
<legend class="p-2 rounded-pill">
<header class="bg-body">
<h5 class="text-start">Facility</h5>
</header>
</legend>
<figure class="form-group bg-primary-subtle rounded p-1 my-2">
<label for="structure-dropdown" class="form-label"
>Structure Type:
</label>
<select id="structure-dropdown" class="form-select">
<option value="0">Other</option>
<option value="0.02">Athanor</option>
<option value="0.04">Tatara</option>
</select>
</figure>
<figure class="form-group bg-primary-subtle rounded p-1 my-2">
<label for="rig-dropdown" class="form-label">Rig:</label>
<select id="rig-dropdown" class="form-select">
<option selected value="0">None</option>
<option value="1">TI</option>
<option value="3">TII</option>
</select>
</figure>
<figure class="form-group bg-primary-subtle rounded p-1 my-2">
<label for="security-dropdown" class="form-label"
>Security Status:</label
>
<select id="security-dropdown" class="form-select m-0">
<option value="0">High</option>
<option value="0.06">Low</option>
<option value="0.12">Null/WH</option>
</select>
</figure>
</fieldset>
<fieldset class="card border-0 bg-gradient p-1">
<legend class="p-2">
<h5 class="text-start">Character</h5>
</legend>
<figure
class="form-group input-group bg-primary-subtle rounded p-1 my-2"
>
<figcaption class="input-group-text">
<label for="implant-dropdown" class="form-label"
>Implant:</label
>
<p class="input-group-text">Zainou 'Beancounter'</p>
<select
id="implant-dropdown"
class="form-select form-control"
>
<option selected value="0">None</option>
<option value="0.01">RX-801</option>
<option value="0.02">RX-802</option>
<option value="0.04">RX-804</option>
</select>
</figcaption>
</figure>
<figure class="form-group">
<label for="reprocessing-skill-dropdown" class="form-label"
>Reprocessing Skill:</label
>
<figcaption class="input-group">
<small class="input-group-text">Level</small>
<select id="reprocessing-skill-dropdown" class="form-select">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</figcaption>
</figure>
</fieldset>
</form>
</article>
</aside>
<!-- Yield Table -->
<aside
id="table-panel"
data-bs-scroll="true"
data-bs-backdrop="false"
tabindex="-1"
aria-labelledby="panel-2-title"
class="offcanvas offcanvas-bottom card bg-primary rounded-0 rounded-top-5 border-top shadow h-50 pt-4 pb-0 ps-1 pe-0 ms-2"
style="border-top-right-radius: 0 !important"
>
<header
class="offcanvas-header bg-body-secondary rounded-top-5"
style="border-top-right-radius: 0 !important"
>
<h5 class="offcanvas-title pb-0 mb-0" id="panel-2-title">
Reprocessing Projector
</h5>
<button
type="button"
class="btn-close mb-0 pb-0"
data-bs-dismiss="offcanvas"
aria-label="Close"
></button>
</header>
<article class="offcanvas-body bg-body-secondary shadow">
<table
id="yield-table"
class="float-end table table-hover table-bordered"
>
<caption>
Description of the table
</caption>
<tr>
<th
rowspan="2"
class="bg-body-tertiary bg-gradient text-bottom justify-content-bottom col-1"
scope="rowgroup"
>
<strong>Ice/Ore Spec. Skill Level</strong>
</th>
<th
colspan="6"
class="bg-body-tertiary bg-gradient"
scope="colgroup"
>
Reprocessing Efficiency Skill Level
</th>
</tr>
<tr>
<th class="bg-body-tertiary" scope="col">0</th>
<th class="bg-body-tertiary" scope="col">1</th>
<th class="bg-body-tertiary" scope="col">2</th>
<th class="bg-body-tertiary" scope="col">3</th>
<th class="bg-body-tertiary" scope="col">4</th>
<th class="bg-body-tertiary" scope="col">5</th>
</tr>
<tbody class="bg-warning bg-opacity-75">
<tr>
<td class="bg-body-tertiary"><strong>0</strong></td>
<td class="bg-danger bg-opacity-100 text-black"></td>
<td class="bg-danger bg-opacity-75 text-black"></td>
<td class="bg-danger bg-opacity-50 text-black"></td>
<td class="bg-danger bg-opacity-25 text-black"></td>
<td class="bg-danger bg-opacity-10 text-black"></td>
<td class="bg-transparent text-black"></td>
</tr>
<tr>
<td class="bg-body-tertiary"><strong>1</strong></td>
<td class="bg-danger bg-opacity-75 text-black"></td>
<td class="bg-danger bg-opacity-50 text-black"></td>
<td class="bg-danger bg-opacity-25 text-black"></td>
<td class="bg-danger bg-opacity-10 text-black"></td>
<td class="bg-transparent text-black"></td>
<td class="bg-success bg-opacity-10 text-black"></td>
</tr>
<tr>
<td class="bg-body-tertiary"><strong>2</strong></td>
<td class="bg-danger bg-opacity-50 text-black"></td>
<td class="bg-danger bg-opacity-25 text-black"></td>
<td class="bg-danger bg-opacity-10 text-black"></td>
<td class="bg-transparent text-black"></td>
<td class="bg-success bg-opacity-10 text-black"></td>
<td class="bg-success bg-opacity-25 text-black"></td>
</tr>
<tr>
<td class="bg-body-tertiary"><strong>3</strong></td>
<td class="bg-danger bg-opacity-25 text-black"></td>
<td class="bg-danger bg-opacity-10 text-black"></td>
<td class="bg-transparent text-black"></td>
<td class="bg-success bg-opacity-10 text-black"></td>
<td class="bg-success bg-opacity-25 text-black"></td>
<td class="bg-success bg-opacity-50 text-black"></td>
</tr>
<tr>
<td class="bg-body-tertiary"><strong>4</strong></td>
<td class="bg-danger bg-opacity-10 text-black"></td>
<td class="bg-transparent text-black"></td>
<td class="bg-success bg-opacity-10 text-black"></td>
<td class="bg-success bg-opacity-25 text-black"></td>
<td class="bg-success bg-opacity-50 text-black"></td>
<td class="bg-success bg-opacity-75 text-black"></td>
</tr>
<tr>
<td class="bg-body-tertiary"><strong>5</strong></td>
<td class="bg-transparent text-black"></td>
<td class="bg-success bg-opacity-10 text-black"></td>
<td class="bg-success bg-opacity-25 text-black"></td>
<td class="bg-success bg-opacity-50 text-black"></td>
<td class="bg-success bg-opacity-75 text-black"></td>
<td class="bg-success bg-opacity-100 text-black"></td>
</tr>
</tbody>
</table>
</article>
</aside>
</main>
<footer class="jumbotron p-2 bg-gradient mt-auto">
<p class="text-sm-center">©️ 2023 Phobiacide</p>
</footer>
<div id="scripts">
<script>
function createArray(size) {
try {
// Check if the size is a valid positive integer
if (!Number.isInteger(size) || size <= 0) {
throw new Error(
"Invalid array size. Please provide a positive integer."
);
}
// Create an array of a specified size, filled with placeholder values
const newArray = new Array(size).fill(null);
return newArray;
} catch (err) {
console.error(err);
// Return null to indicate an error
return null;
}
}
function populateTable() {
const getValue = (id) => document.getElementById(id).value;
const rig = +getValue("rig-dropdown");
const implant = +getValue("implant-dropdown");
const security = +getValue("security-dropdown");
const structure = +getValue("structure-dropdown");
const reprocessingSkill = +getValue("reprocessing-skill-dropdown");
// Get a reference to the existing table
const table = document.getElementById("yield-table");
const calculateTableValue = (x, y) =>
(50 + rig) *
(1 + 0.02 * x) *
(1 + 0.02 * y) *
(1 + implant) *
(1 + 0.03 * reprocessingSkill) *
(1 + structure) *
(1 + security);
for (let i = 2; i < table.rows.length; i++) {
for (let j = 1; j < table.rows[i].cells.length; j++) {
const result = calculateTableValue(j - 1, i - 1);
table.rows[i].cells[j].innerHTML = result.toFixed(2) + "%";
}
}
}
// Attach the populateTable function to the form change event
document.getElementById("form").addEventListener("change", () => {
populateTable();
});
document.addEventListener("DOMContentLoaded", () => {
populateTable();
});
</script>
<!-- Poppers.js -->
<script
fetchpriority="low"
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
crossorigin="anonymous"
></script>
<!-- Bootstrap Bundle -->
<script
fetchpriority="auto"
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js"
integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+"
crossorigin="anonymous"
></script>
</div>
</body>
</html>