-
Notifications
You must be signed in to change notification settings - Fork 0
/
7key.skin.lua
136 lines (124 loc) · 4.76 KB
/
7key.skin.lua
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
local NoteSkinVsrg = require("sphere.models.NoteSkinModel.NoteSkinVsrg")
local BasePlayfield = require("sphere.models.NoteSkinModel.BasePlayfield")
local JustConfig = require("sphere.JustConfig")
local root = (...):match("(.+)/.-")
local config = JustConfig:fromFile(root .. "/configs/7key.config.lua")
local sphereElements = require(root .. "/Modules/SphereElements")
local noteskin = NoteSkinVsrg({
path = ...,
name = "Kori's Pick",
inputMode = "7key",
range = {-1, 1},
unit = 1080,
config = config,
hitposition = 1059,
})
local playfield = BasePlayfield(noteskin)
noteskin:setInput({"key1","key2","key3","key4","key5","key6","key7"})
noteskin:setColumns({
offset = 0,
align = "center",
width = {128, 128, 128, 128, 128, 128, 128},
space = {0, 0, 0, 0, 0, 0, 0, 0},
})
noteskin:setTextures({
{pixel = "pixel.png"},
{talt = "note/LNTalt.png"},
{balt = "note/LNBalt.png"},
{bwhite = "note/LNBwhite.png"},
{bblue = "note/LNBblue.png"},
{byellow = "note/LNByellow.png"},
{bgreen = "note/LNBgreen.png"},
{nwhite = "note/NOTwhite.png"},
{nblue = "note/NOTblue.png"},
{nyellow = "note/NOTyellow.png"},
{ngreen = "note/NOTgreen.png"},
})
noteskin:setImagesAuto()
local hand = config:get("handicap") == true
local side = config:get("handicapside") == "Right"
noteskin:setShortNote({h = 108,
image = {
not hand and "nwhite" or (not side and "ngreen" or "nwhite"),
not hand and "nblue" or (not side and "nwhite" or "nblue"),
not hand and "nwhite" or (not side and "nblue" or "nwhite"),
not hand and "nyellow" or "nwhite",
not hand and "nwhite" or (side and "nblue" or "nwhite"),
not hand and "nblue" or (side and "nwhite" or "nblue"),
not hand and "nwhite" or (side and "ngreen" or "nwhite"),
},
})
local altlong = config:get("altln") == true
noteskin:setLongNote({h = 108,
head = {
not hand and "nwhite" or (not side and "ngreen" or "nwhite"),
not hand and "nblue" or (not side and "nwhite" or "nblue"),
not hand and "nwhite" or (not side and "nblue" or "nwhite"),
not hand and "nyellow" or "nwhite",
not hand and "nwhite" or (side and "nblue" or "nwhite"),
not hand and "nblue" or (side and "nwhite" or "nblue"),
not hand and "nwhite" or (side and "ngreen" or "nwhite"),
},
body = {
altlong and "balt" or (not hand and "bwhite" or (not side and "bgreen" or "bwhite")),
altlong and "balt" or (not hand and "bblue" or (not side and "bwhite" or "bblue")),
altlong and "balt" or (not hand and "bwhite" or (not side and "bblue" or "bwhite")),
altlong and "balt" or (not hand and "byellow" or "bwhite"),
altlong and "balt" or (not hand and "bwhite" or (side and "bblue" or "bwhite")),
altlong and "balt" or (not hand and "bblue" or (side and "bwhite" or "bblue")),
altlong and "balt" or (not hand and "bwhite" or (side and "bgreen" or "bwhite")),
},
tail = {
altlong and "talt" or (not hand and "nwhite" or (not side and "ngreen" or "nwhite")),
altlong and "talt" or (not hand and "nblue" or (not side and "nwhite" or "nblue")),
altlong and "talt" or (not hand and "nwhite" or (not side and "nblue" or "nwhite")),
altlong and "talt" or (not hand and "nyellow" or "nwhite"),
altlong and "talt" or (not hand and "nwhite" or (side and "nblue" or "nwhite")),
altlong and "talt" or (not hand and "nblue" or (side and "nwhite" or "nblue")),
altlong and "talt" or (not hand and "nwhite" or (side and "ngreen" or "nwhite")),
},
})
if config:get("barline") == true then
noteskin:addMeasureLine({h = 2,
color = {1, 1, 1, 0.2},
image = "pixel",
})
end
noteskin:addBga({x = 0, y = 0, w = 1, h = 1,
color = {0.25, 0.25, 0.25, 1},
})
playfield:addBga({
transform = {{1 / 2, -16 / 9 / 2}, {0, -7 / 9 / 2}, 0, {0, 16 / 9}, {0, 16 / 9}, 0, 0, 0, 0},
})
playfield:addColumnsBackground({
color = {0, 0, 0, 1},
})
playfield:enableCamera()
playfield:addKeyImages({h = 131,
padding = 0,
pressed = {
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
config:get("receptorlight") and "key/scale3lit.png" or "key/scale3.png",
},
released = {
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
"key/scale3.png",
},
})
playfield:addNotes()
playfield:disableCamera()
sphereElements.theThing(noteskin, playfield, noteskin.inputMode, noteskin.columnsCount)
return noteskin