-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
376 lines (363 loc) · 18.5 KB
/
index.html
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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
<title>OccultAxis's Item List</title>
<script type="text/javascript">
const itemListURL = "https://raw.githubusercontent.com/Spacedestructor/OccultAxis-Toolkit/master/StoreItems.json";
const eventListURL = "https://raw.githubusercontent.com/Spacedestructor/OccultAxis-Toolkit/master/StoreIncidents.json";
</script>
<link rel="icon"
href="https://static-cdn.jtvnw.net/jtv_user_pictures/0b859cb3-1675-459b-9872-c6d72ef33cdb-profile_image-70x70.png">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">OccultAxis</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.twitch.tv/OccultAxis">OccultAxis on Twitch</a>
</li>
</ul>
</div>
</nav>
<main role="main">
<div class="jumbotron">
<div class="container">
<h1 class="display-3">TwitchToolkit</h1>
<p>TwitchToolkit is a mod written by Twitch.tv/hodlhodl that integrates storytelling decisions into chat
votes, awards viewers coins for watching, and those coins can be spent on items/events in game.</p>
<ul class="list-group">
<li class="list-group-item">!bal - check balance and karma rate</li>
<li class="list-group-item">!buy - Syntax: !buy beer 6 - purchase an item or event</li>
<li class="list-group-item">!whatiskarma - explains what the karma system is</li>
<li class="list-group-item">!purchaselist - gives users a link to the public purchase list</li>
<li class="list-group-item">!instructions - gives users info on using the mod</li>
<li class="list-group-item">!modinfo - gives users info about the mod</li>
<li class="list-group-item">!modsettings - gives user info on how many coins are being earned and
global settings</li>
<li class="list-group-item">!giftcoins - Syntax: !giftcoins @username 100 - give another viewer your
coins</li>
<li class="list-group-item">!allcommands - shows all available commands to the user, this does not
translate by default so it can be universally recognized.</li>
<li class="list-group-item">!joinqueue - join the viewer name queue</li>
<li class="list-group-item">!mypawnstory - view information about your pawns backstory</li>
<li class="list-group-item">!mypawnskills - view information about your pawns skills</li>
<li class="list-group-item">!levelskill</li>
<li class="list-group-item">!installedmods - shows you a list of currently running mods</li>
<li class="list-group-item">!lookup - Usage: !lookup category itemname where "category" can be
power, security, animal etc. and "itemname" is the search input for used category</li>
<li class="list-group-item">Max Traits: 4 - View <a href="https://rimworldwiki.com/wiki/Traits">Traits</a> here!</li>
<li class="list-group-item">Max Karma: 165%</li>
<li class="list-group-item">Minimum spending: 60</li>
</ul>
<div><b>ALL ITEMS ARE DISABLED CURRENTLY!</b></div>
<div> If this Page is acting up you may want to <a href="https://www.githubstatus.com">check here for Issues</a></div>
<div>
<form id="Cost-Calculator">
<label for="Coins">Coins/Ammount:</label>
<input type="number" id="Coins" name="Coins" value="0" autocomplete="off" placeholder="0" required>
<label for="Item">Cost:</label>
<input type="number" id="Cost" name="Cost" value="0" autocomplete="off" placeholder="0" required><br>
<input type="radio" id="Calculate_Ammount" name="Calculate_Options" value="Calculate Amount"
checked>
<label for="Calculate_Ammount">Calculate Ammount</label>
<input type="radio" id="Calculate_Cost" name="Calculate_Options" value="Calculate Cost">
<label for="Calculate_Cost">Calculate Cost</label><br>
<button type="button" onclick="Calculator()">Calculate</button>
<button type="button" onclick="Reset()">Reset</button>
</form>
<div id="Results"></div>
</div>
</div>
</div>
<div ng-app='tabs' ng-controller='tabCtrl'>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class='tabs'>
<form>
<div class="form-group">
<button class="btn btn-success" ng-class="{'active': (selected == '1')}"
ng-click='selected=1'>
Items
</button>
<button class="btn btn-success" ng-class="{'active': (selected == '2')}"
ng-click='selected=2'>
Events
</button>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="">Price Between:</label>
<div class="col-sm-2">
<input type="number" class="form-control" id="item-price-min" placeholder="0">
</div>
<div class="col-sm-2">
<input type="number" class="form-control" id="item-price-max" placeholder="100000">
</div>
</div>
</form>
</div>
</div>
</div>
<div class="row" ng-show='selected == 1'>
<div class="col-md-12">
<div id="items">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Search</span>
</div>
<input type="text" class="form-control search" aria-label="Search"
aria-describedby="inputGroup-sizing-sm">
</div>
<p>
<button type="button" class="btn btn-primary sort" data-sort="abr">
Sort
</button>
<button type="button" class="btn btn-primary sort" data-sort="price">
Sort by Price
</button>
</p>
<table class="table items">
<tr>
<th scope="col" class="sort" data-sort="abr">Name</th>
<th scope="col" class="sort" data-sort="price">Price</th>
<th scope="col" class="sort" data-sort="category">Category</th>
</tr>
<tbody class="list">
</tbody>
</table>
</div>
</div>
</div>
<div class="row" ng-show='selected == 2'>
<div class="col-md-12">
<div id="events">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Search</span>
</div>
<input type="text" class="form-control search" aria-label="Search"
aria-describedby="inputGroup-sizing-sm">
</div>
<p>
<button type="button" class="btn btn-primary sort" data-sort="abr">
Sort
</button>
<button type="button" class="btn btn-primary sort" data-sort="price">
Sort by Price
</button>
<button type="button" class="btn btn-primary sort" data-sort="karmatype">
Sort by Karma
</button>
</p>
<table class="table events">
<tr>
<th scope="col" class="sort" data-sort="abr">Name</th>
<th scope="col" class="sort" data-sort="price">Price</th>
<th scope="col" class="sort" data-sort="karmatype">Karma</th>
</tr>
<tbody class="list">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
</div>
</div>
<hr>
</div>
</main>
<footer class="text-muted">
<div class="container">
<p class="float-right">
<a href="#">Back to top</a>
</p>
<p>Album example is © Bootstrap, but please download and customize it for yourself!</p>
<p>New to Bootstrap? <a href="../../">Visit the homepage</a> or read our <a
href="../../getting-started/">getting started guide</a>.</p>
</div>
</footer>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<style>
.sort:after {
display: inline-block;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid transparent;
content: "";
position: relative;
top: -10px;
right: -5px;
}
.sort.asc:after {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #fff;
content: "";
position: relative;
top: 4px;
right: -5px;
}
.sort.desc:after {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid #fff;
content: "";
position: relative;
top: -4px;
right: -5px;
}
</style>
<script type="text/javascript">
let itemList = null;
$.getJSON(itemListURL, function (data) {
var options = {
valueNames: ['abr', 'price', 'category'],
item: '<tr><td class="abr" scope="row"></td><td class="price"></td><td class="category"></td></tr>'
};
var itemData = [];
$.each(data.items, function (index, value) {
if (value["price"] > 0) {
itemData.push(value);
}
});
itemList = new List('items', options, itemData);
});
let eventList = null;
$.getJSON(eventListURL, function (data) {
var options = {
valueNames: ['abr', 'price', 'karmatype'],
item: '<tr><td class="abr" scope="row"></td><td class="price"></td><td class="karmatype"></td></tr>'
};
var eventData = [];
$.each(data.incitems, function (index, value) {
if (value["price"] > 0) {
eventData.push(value);
}
});
eventList = new List('events', options, eventData);
});
$("#item-price-min").keyup(function () {
updateItemFilter();
});
$("#item-price-max").keyup(function () {
updateItemFilter();
});
function updateItemFilter() {
var minPrice = $("#item-price-min").val();
var maxPrice = $("#item-price-max").val();
itemList.filter(function (item) {
var allow = true;
if (minPrice != "" && parseInt(item.values().price) < minPrice) {
allow = false;
}
if (maxPrice != "" && parseInt(item.values().price) > maxPrice) {
allow = false;
}
return allow;
});
eventList.filter(function (item) {
var allow = true;
if (minPrice != "" && parseInt(item.values().price) < minPrice) {
allow = false;
}
if (maxPrice != "" && parseInt(item.values().price) > maxPrice) {
allow = false;
}
return allow;
});
}
</script>
<script type="text/javascript">
var tabs = angular.module('tabs', [])
.controller('tabCtrl', function ($scope) {
$scope.selected = "1";
});
</script>
<script>
function Calculator() {
var Counter = 0, Coins = 0, Cost = 0, Current = 0;
Coins = document.getElementById("Coins").value;
Cost = document.getElementById("Cost").value;
if (Coins == null || Cost == null) {
console.log(`Error. Either Coins or Cost resulted in null!`);
document.getElementById(`Results`).innerHTML += `Error. Either Coins or Cost resulted in null!<br>`;
}
if (Coins == 0 && Cost == 0) {
console.log(`Why do you bother me wit this?`);
document.getElementById(`Results`).innerHTML += `Why do you bother me with this?<br>`;
}
else {
Counter = Number(Counter);
Coins = Number(Coins);
Cost = Number(Cost);
Current = Number(Current)
if (document.getElementById(`Calculate_Ammount`).checked) {
console.log(`Input[Ammount: ${Counter} Coins left: ${Coins} Total Cost: ${Current}]`);
document.getElementById(`Results`).innerHTML += `Input[Ammount: ${Counter} Coins left: ${Coins} Total Cost: ${Current}]<br>`;
while (Coins >= Cost) {
Counter += 1;
Coins -= Cost;
Current = Current + Cost;
}
console.log(`Ammount: ${Counter} Coins left: ${Coins} Total Cost: ${Current}`);
document.getElementById(`Results`).innerHTML += `Ammount: ${Counter} Coins left: ${Coins} Total Cost: ${Current}<br>`;
}
if (document.getElementById(`Calculate_Cost`).checked) {
console.log(`Input[Ammount: ${Counter} Cost: ${Cost} Total Cost: ${Current}]`);
document.getElementById(`Results`).innerHTML += `Input[Ammount: ${Coins} Cost: ${Cost} Total Cost: ${Current}]<br>`;
while (Counter < Coins) {
Counter += 1;
Current = Current + Cost;
}
console.log(`Ammount: ${Counter} Cost: ${Cost} Total Cost: ${Current}`);
document.getElementById(`Results`).innerHTML += `Ammount: ${Counter} Cost: ${Cost} Total Cost: ${Current}<br>`;
}
}
}
function Reset() {
Counter = 0, Coins = 0, Cost = 0, Current = 0;
document.getElementById(`Results`).innerHTML = ``;
console.log(`Calculator History reset!`);
}
</script>
</body>
</html>