forked from LinoBigatti/TAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopposite.gd
50 lines (39 loc) · 1.25 KB
/
opposite.gd
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
# Any script that interacts with the Project Heartbeat API is licensed under the
# AGPLv3 for the general public and also gives an exclusive, royalty-free license
# for EIRTeam to incorporate it in the game
# Documentation for the scripting system can be found here: https://steamcommunity.com/sharedfiles/filedetails/?id=2398390074
#
# Opposite note converter
# By Lino
#
extends ScriptRunnerScript # Do not remove this
func run_script() -> int:
# Get selected timing points
var selected_timing_points := get_selected_timing_points()
# Invert them pokeWhat
selected_timing_points.invert()
# Iterate over them
for i in range(selected_timing_points.size()):
var point := selected_timing_points[i] as HBTimingPoint
# get and change current note type
var noteType = point.note_type
match noteType:
0, 1: # Triangle or square
noteType += 2
2, 3: # Cross or circle
noteType -= 2
4: # Left slider
noteType = 5
5: # Right slider
noteType = 4
6: # Left slider
noteType = 7
7: # Right slider
noteType = 6
8: # Heart
pass
# Set the type
set_timing_point_property(point, "note_type", noteType)
# Return OK to apply the script's changes, return anything else (such as -1)
# to cancel it
return OK