This repository has been archived by the owner on Oct 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest2.py
120 lines (116 loc) · 2.28 KB
/
test2.py
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
NoFail = 1
Easy = 2
NoVideo = 4
Hidden = 8
HardRock = 16
SuddenDeath = 32
DoubleTime = 64
Relax = 128
HalfTime = 256
Nightcore = 512
Flashlight = 1024
Autoplay = 2048
SpunOut = 4096
Relax2 = 8192
Perfect = 16384
Key4 = 32768
Key5 = 65536
Key6 = 131072
Key7 = 262144
Key8 = 524288
keyMod = 1015808
FadeIn = 1048576
Random = 2097152
LastMod = 4194304
Key9 = 16777216
Key10 = 33554432
Key1 = 67108864
Key2 = 268435456
Key3 = 134217728
SCOREV2 = 536870912
def ConvertInputMode(val):
if val == '1':
return "All Recalc"
elif val == '2':
return "Specific User Recalc"
elif val == '3':
return "Specific Score Recalc"
else:
return "None"
def ConvertInputMods(val):
if val == '1':
return "All Mods"
elif val == '2':
return "Regullar Mod Only"
elif val == '3':
return "Relax Mod Only"
else:
return "None"
def ConvertMode(m):
r = []
hasNightcore = False
hasPF = False
if m & Easy:
r.append("NF")
if m & NoFail:
r.append("NF")
if m & HalfTime:
r.append("HT")
if m & HardRock:
r.append("HR")
if m & Perfect:
hasPF = True
r.append("PF")
if m & SuddenDeath and hasPF == False:
r.append("SD")
if m & Nightcore:
r.append("NC")
hasNightcore = True
if m & DoubleTime and hasNightcore == False:
r.append("DT")
if m & Hidden:
r.append("HD")
if m & Flashlight:
r.append("FL")
if m & Random:
r.append("RD")
if m & Autoplay:
r.append("AT")
if m & SpunOut:
r.append("SO")
if m & Relax:
r.append("RX")
if m & Relax2:
r.append("AP")
if m & Key1:
r.append('1K')
if m & Key2:
r.append('2K')
if m & Key3:
r.append('3K')
if m & Key4:
r.append('4K')
if m & Key5:
r.append('5K')
if m & Key6:
r.append('6K')
if m & Key7:
r.append('7K')
if m & Key8:
r.append('8K')
if m & Key9:
r.append('9K')
if m & Key10:
r.append('10K')
if m & keyMod:
r.append("")
if m & LastMod:
r.append("CN")
if m & SCOREV2:
r.append("V2")
if len(r) > 0:
return r
else:
return []
a = ConvertMode(216)
print(a)