Minified atree constants file; remove unused (old) script
This commit is contained in:
parent
fe3445c16b
commit
beb47c7f3d
3 changed files with 3 additions and 25 deletions
|
@ -1404,7 +1404,7 @@
|
||||||
<script type="text/javascript" src="../js/skillpoints.js"></script>
|
<script type="text/javascript" src="../js/skillpoints.js"></script>
|
||||||
<script type="text/javascript" src="../js/damage_calc.js"></script>
|
<script type="text/javascript" src="../js/damage_calc.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../js/atree_constants.js"></script>
|
<script type="text/javascript" src="../js/atree_constants_min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../js/display_constants.js"></script>
|
<script type="text/javascript" src="../js/display_constants.js"></script>
|
||||||
|
|
||||||
|
|
2
js/atree_constants_min.js
Normal file
2
js/atree_constants_min.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,24 +0,0 @@
|
||||||
import csv
|
|
||||||
import json
|
|
||||||
import re
|
|
||||||
|
|
||||||
with open('atree.csv', newline='') as csvfile:
|
|
||||||
res = ""
|
|
||||||
reader = csv.DictReader(csvfile)
|
|
||||||
for row in reader:
|
|
||||||
if not row["connector"]:
|
|
||||||
row["connector"] = False
|
|
||||||
else:
|
|
||||||
row["connector"] = True
|
|
||||||
row["row"] = int(row["row"])
|
|
||||||
row["col"] = int(row["col"])
|
|
||||||
if row["rotate"].isdigit():
|
|
||||||
row["rotate"] = int(row["rotate"])
|
|
||||||
else:
|
|
||||||
row.pop("rotate")
|
|
||||||
row["desc"] = re.sub("\n", " ", row["desc"])
|
|
||||||
|
|
||||||
resjson = json.dumps(row)
|
|
||||||
res += str(resjson) + ",\n"
|
|
||||||
|
|
||||||
print(res)
|
|
Loading…
Reference in a new issue