Fixes for remaining songs without stages
This commit is contained in:
parent
71ad1840a3
commit
bb04425fb8
@ -8681,7 +8681,7 @@
|
||||
"player3": "none",
|
||||
"song": "Obituary",
|
||||
"needsVoices": true,
|
||||
"stage": "stages",
|
||||
"stage": "stage",
|
||||
"validScore": true,
|
||||
"bpm": 101,
|
||||
"speed": 2.3
|
||||
|
@ -5788,7 +5788,7 @@
|
||||
"player2": "tankman",
|
||||
"player3": null,
|
||||
"song": "Stress",
|
||||
"stage": "tank",
|
||||
"stage": "stage",
|
||||
"needsVoices": true,
|
||||
"validScore": true,
|
||||
"bpm": 178,
|
||||
|
@ -44,6 +44,9 @@ local function state(songName, songDifficulty)
|
||||
local unspawnedNotes = {}
|
||||
local notes = {}
|
||||
|
||||
local unspawnedHoldNotes = {}
|
||||
local holdNotes = {}
|
||||
|
||||
local characters = {}
|
||||
|
||||
local settings = {}
|
||||
@ -210,17 +213,21 @@ local function state(songName, songDifficulty)
|
||||
end
|
||||
|
||||
for index, note in next, unspawnedNotes do
|
||||
if note.position - elapsed < 600 and note.mustPress then
|
||||
note:spawn()
|
||||
unspawnedNotes[index] = nil
|
||||
notes[#notes+1] = note
|
||||
elseif note.position - elapsed < 600 and not note.mustPress then
|
||||
if note.position - elapsed < 600 then
|
||||
note:spawn()
|
||||
unspawnedNotes[index] = nil
|
||||
notes[#notes+1] = note
|
||||
end
|
||||
end
|
||||
|
||||
for index, holdNote in next, unspawnedHoldNotes do
|
||||
if holdNote.position - elapsed < 600 then
|
||||
holdNote:spawn()
|
||||
unspawnedHoldNotes[index] = nil
|
||||
holdNotes[#notes+1] = holdNote
|
||||
end
|
||||
end
|
||||
|
||||
for index, note in next, notes do
|
||||
if note.mustPress then
|
||||
note.sprite.position = myTypes.Vector2(600 + (79 * (note.direction - 1)), settings.Downscroll and 430 - (note.position-elapsed) or note.position - elapsed)
|
||||
@ -247,6 +254,29 @@ local function state(songName, songDifficulty)
|
||||
end
|
||||
end
|
||||
|
||||
for index, hold in next, holdNotes do
|
||||
if hold.mustPress then
|
||||
hold.sprite.position = myTypes.Vector2(600 + (79 * (hold.direction - 1)), settings.Downscroll and 430 - (hold.position-elapsed) or hold.position - elapsed)
|
||||
if hold.position - elapsed < 50 then
|
||||
if love.keyboard.isDown(keyBinds[hold.direction]) then
|
||||
if section.altAnim or hold.altAnim then
|
||||
characters.dad:PlayAnimation("sing"..directions[hold.direction].."-alt")
|
||||
else
|
||||
characters.dad:PlayAnimation("sing"..directions[hold.direction])
|
||||
end
|
||||
hold:destroy()
|
||||
holdNotes[index] = nil
|
||||
elseif hold.position - elapsed < -150 then
|
||||
hold:destroy()
|
||||
miss:stop()
|
||||
miss:play()
|
||||
characters.bf:PlayAnimation("sing"..directions[hold.direction].."miss")
|
||||
holdNotes[index] = nil
|
||||
ratings.miss = ratings.miss + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
zoom = myMath.lerp(zoom, 1, .05)
|
||||
|
||||
@ -317,10 +347,24 @@ local function state(songName, songDifficulty)
|
||||
characters.dad.stagePosition = myTypes.Vector2(stage.opponent[1], stage.opponent[2])
|
||||
|
||||
|
||||
conductor.stepCrochet = conductor:calculateCrochet(chart.bpm)/4
|
||||
|
||||
for index, section in next, chart.notes do
|
||||
for index, note in next, section.sectionNotes do
|
||||
local newNote = myTypes.note(note, section.mustHitSection)
|
||||
unspawnedNotes[#unspawnedNotes+1] = newNote
|
||||
|
||||
-- if note[3] > 0 then
|
||||
-- local length = note[3] / conductor.stepCrochet
|
||||
|
||||
-- for i = 0, length - 1, .1 do
|
||||
-- local newHold = myTypes.note({note[1] + i * conductor.stepCrochet, note[2], note[3], note[4]}, section.mustHitSection, true)
|
||||
-- unspawnedHoldNotes[#unspawnedHoldNotes+1] = newHold
|
||||
-- end
|
||||
-- local newHold = myTypes.note({note[1] + length * conductor.stepCrochet, note[2], note[3], note[4]}, section.mustHitSection, true, true)
|
||||
-- unspawnedHoldNotes[#unspawnedHoldNotes+1] = newHold
|
||||
-- end
|
||||
-- not yet
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -10,7 +10,7 @@ local sprites = {
|
||||
"red"
|
||||
}
|
||||
|
||||
function module.note(raw, mustHitSection)
|
||||
function module.note(raw, mustHitSection, hold, holdEnd)
|
||||
|
||||
local newNote = setmetatable({
|
||||
position = raw[1],
|
||||
@ -19,7 +19,9 @@ function module.note(raw, mustHitSection)
|
||||
direction = raw[2] <= 3 and raw[2] + 1 or raw[2] - 3,
|
||||
spawned = false,
|
||||
sprite = nil, -- For unspawned notes
|
||||
altAnim = raw[4] == "Alt"
|
||||
altAnim = raw[4] == "Alt",
|
||||
hold = hold,
|
||||
last = holdEnd
|
||||
}, NoteClass)
|
||||
|
||||
return newNote
|
||||
@ -30,7 +32,9 @@ function NoteClass:spawn()
|
||||
|
||||
self.sprite = sprite
|
||||
|
||||
sprite:Frame(sprites[self.direction], 0)
|
||||
local spriteFrame = self.hold and (self.holdEnd and sprites[self.direction].." hold end" or sprites[self.direction].." hold piece") or sprites[self.direction]
|
||||
|
||||
sprite:Frame(spriteFrame, 0)
|
||||
|
||||
sprite.ui = true -- so it doesnt move with the camera
|
||||
|
||||
|
@ -464,7 +464,7 @@
|
||||
"_frameHeight": "149"
|
||||
},
|
||||
{
|
||||
"_name": "pruple end hold0000",
|
||||
"_name": "purple hold end0000",
|
||||
"_x": "704",
|
||||
"_y": "976",
|
||||
"_width": "50",
|
||||
|
Reference in New Issue
Block a user