Skip to content

Commit

Permalink
additional hook safety
Browse files Browse the repository at this point in the history
  • Loading branch information
microlith57 committed Jun 26, 2023
1 parent 3ab3797 commit 456968f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Loenn/libraries/patch_celeste_render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ end
patch the getRoomBackgroundColor function to return transparency if there are stylegrounds behind (so they aren't covered up)
]]
local _orig_getRoomBackgroundColor = celesteRender.getRoomBackgroundColor
function celesteRender.getRoomBackgroundColor(room, selected)
if stylegroundPreview and stylegroundPreview.bg_enabled then
return {0, 0, 0, 0}
else
return _orig_getRoomBackgroundColor(room, selected)
if stylegroundPreview then
function celesteRender.getRoomBackgroundColor(room, selected, state)
if stylegroundPreview and stylegroundPreview.bg_enabled then
return {0, 0, 0, 0}
else
return _orig_getRoomBackgroundColor(room, selected, state)
end
end
end

Expand Down

0 comments on commit 456968f

Please sign in to comment.