Skip to content

Commit

Permalink
weeks:generatePsychEvents function, fix stage editor for mod folder mods
Browse files Browse the repository at this point in the history
  • Loading branch information
GuglioIsStupid committed Jun 21, 2024
1 parent 7de5ba8 commit 3f7e7a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/love/modules/extras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,24 @@ function weeks.legacyGenerateNotes(self, chart)
end
end

function weeks.generatePsychEvents(self, eventsChart)
modEvents = {}
local eventsChart = getFilePath(eventsChart)
eventsChart = json.decode(love.filesystem.read(eventsChart)).song

for i, event in ipairs(eventsChart.events) do
local time, eventData = event[1], event[2]

table.insert(modEvents, {
time = time,
events = eventData
})
end


table.sort(modEvents, function(a, b) return a.time < b.time end)
end

function weeks.cneGenerateNotes(self, chart, metadata)
if importMods.inMod then
importMods.setupScripts()
Expand Down
1 change: 1 addition & 0 deletions src/love/states/debug/stage-debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ return {
else
importMods.setCurrentMod(importMods.getModFromStage(fileStr))
curStage = importMods.getStageFileFromName(fileStr)()
importMods.inMod = true
end
curStage:enter()
if not camera.points["enemy"] then camera:addPoint("enemy", -boyfriend.x + 100, -boyfriend.y + 75) end
Expand Down

0 comments on commit 3f7e7a2

Please sign in to comment.