post-obamonsta world changes

This commit is contained in:
jill 2021-01-01 11:03:42 +03:00
parent 7dfb27a121
commit 4fda77379f
Signed by: oat
GPG Key ID: DD83A9617A252385
1 changed files with 16 additions and 15 deletions

View File

@ -14,13 +14,13 @@
-- ending: ending beat -- ending: ending beat
-- trunc: whether to include the notes at beat (ending) -- trunc: whether to include the notes at beat (ending)
-c2l(notedata) -- uses an existing chart2lua /c2l(notedata) -- uses an existing chart2lua
-- notedata: notitg format notedata, like the automatically generated notedata from 'save area to lua' -- notedata: notitg format notedata, like the automatically generated notedata from 'save area to lua'
-- beat -- beat
-beat(table) -- raw beat input +beat(table) -- raw beat input
-- table: beat table of every beat to fire on -- table: beat table of every beat to fire on
@ -73,7 +73,7 @@
+beatobj:clone(beat) -- clones the beat timings from the first beat onward to the beat +beatobj:clone(beat) -- clones the beat timings from the first beat onward to the beat
-- beat: the beat to copy the rhythm to -- beat: the beat to copy the rhythm to
+beatobj:forclone(start, ending, add) -- clone(), but as a for loop -beatobj:forclone(start, ending, add) -- clone(), but as a for loop
-- start, ending and add act like arguments to a for loop -- start, ending and add act like arguments to a for loop
+beatobj:filter(filterfunc) -- filters the beatobj with a filter function, return true to keep the element and false to discard it +beatobj:filter(filterfunc) -- filters the beatobj with a filter function, return true to keep the element and false to discard it
@ -158,23 +158,12 @@
for i,v in ipairs(self._beats) do for i,v in ipairs(self._beats) do
local newv = {} local newv = {}
newv[1] = v[1] - self._beats[1][1] + beat newv[1] = v[1] - self._beats[1][1] + beat
print(newv[1])
table.insert(newbeats, newv) table.insert(newbeats, newv)
end end
self._beats = newbeats self._beats = newbeats
return self return self
end, end,
forclone = function(self, start, ending, add)
add = add or 1
local oldself = copyTable(self)
for i = start, ending, add do
self = self:add(oldself:clone(i))
end
return self
end,
merge = function(self) merge = function(self)
local seen = {} local seen = {}
local merged = {} local merged = {}
@ -346,7 +335,11 @@
function c2l(start, ending, trunc) function c2l(start, ending, trunc)
local self = copyTable(beatobjTemplate) local self = copyTable(beatobjTemplate)
self._beats = P1:GetNoteData(start, ending) if ending == nil then
self._beats = start
else
self._beats = P1:GetNoteData(start, ending)
end
return self return self
end end
@ -362,5 +355,13 @@
self._beats = v self._beats = v
return self return self
end end
function beat(tbl)
local self = copyTable(beatobjTemplate)
for _,b in ipairs(tbl) do
table.insert(self._beats, {b})
end
return self
end
end)" end)"
Type = "ActorFrame"/> Type = "ActorFrame"/>