Skip to content

Commit 373d7fc

Browse files
committedMay 17, 2021
add venv script
1 parent 1c56603 commit 373d7fc

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed
 

‎.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.lnk
55
*.txt
66
*.sqlite
7-
*.sh
87

98
/manifest/parse.py
109
/manifest/DL_DecryptManifest.exe

‎loader/Aiscript.py

+10-20
Original file line numberDiff line numberDiff line change
@@ -374,24 +374,24 @@ def __init__(self, name):
374374
@staticmethod
375375
def add_rt_var(v, value=None, opt=None):
376376
if v not in Root.RT_VAR:
377-
Root.RT_VAR[v] = set()
377+
Root.RT_VAR[v] = []
378378
if value is None and opt is None:
379-
Root.RT_VAR[v].add(True)
380-
Root.RT_VAR[v].add(False)
379+
Root.RT_VAR[v].append(True)
380+
Root.RT_VAR[v].append(False)
381381
try:
382382
value = float(value)
383383
if opt in (Compare.largeEqual, Compare.small):
384-
Root.RT_VAR[v].add(value - 0.0001)
384+
Root.RT_VAR[v].append(value - 0.0001)
385385
elif opt in (Compare.smallEqual, Compare.large):
386-
Root.RT_VAR[v].add(value + 0.0001)
386+
Root.RT_VAR[v].append(value + 0.0001)
387387
elif opt in (Compare.repudiation, Compare.equal):
388388
if value == 0:
389-
Root.RT_VAR[v].add(1)
389+
Root.RT_VAR[v].append(1)
390390
else:
391-
Root.RT_VAR[v].add(-value)
391+
Root.RT_VAR[v].append(-value)
392392
except (TypeError, ValueError):
393393
pass
394-
Root.RT_VAR[v].add(value)
394+
Root.RT_VAR[v].append(value)
395395

396396
def add_child(self, child):
397397
self.children.append(child)
@@ -415,18 +415,8 @@ def py_str(self, enemy_actions=None):
415415

416416
rt_var_str = []
417417
for name, values in sorted(Root.RT_VAR.items()):
418-
# converted_values = set()
419-
# for v in values:
420-
# try:
421-
# float(v)
422-
# converted_values.add(str(v))
423-
# except ValueError:
424-
# converted_values.add(f"partial(getattr, self, {v!r})")
425-
try:
426-
values = tuple(sorted(values))
427-
except TypeError:
428-
values = tuple(values)
429-
rt_var_str.append(Root.RT_PATTERN.format(name=s(name, prefix=""), values=values))
418+
# ensure ordering
419+
rt_var_str.append(Root.RT_PATTERN.format(name=s(name, prefix=""), values=tuple({v: None for v in values}.keys())))
430420
rt_var_str = "\n".join(rt_var_str)
431421
# rt_list_str = "" if not rt_var_str else f" RUNTIME_VARS = {tuple(Root.RT_VAR.keys())}\n"
432422

‎venv.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
python -m venv .venv
2+
source .venv/Scripts/activate
3+
pip install UnityPy -q --no-input
4+
pip install tqdm -q --no-input
5+
pip install unidecode -q --no-input
6+
# pip install black

0 commit comments

Comments
 (0)
Please sign in to comment.