Skip to content

Commit

Permalink
fix years old bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Inorizushi committed Feb 18, 2022
1 parent fda4a8b commit c89a57d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
54 changes: 26 additions & 28 deletions BGAnimations/ScreenStageInformation decorations/default.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
local jk = LoadModule"Jacket.lua"

local t = Def.ActorFrame {
--LoadActor("BranchHandler.lua");
LoadActor(THEME:GetPathB("","EX.png"))..{
InitCommand=function(s) s:visible(GAMESTATE:IsAnExtraStage()):Center() end,
OnCommand=function(s) s:sleep(0.2):linear(0.1):diffusealpha(0) end,
};
LoadActor(THEME:GetPathB("","_StageDoors"))..{
OnCommand=function(s) s:playcommand("AnOn") end,
OnCommand=function(s) s:finishtweening():queuecommand("AnOn") end,
};
LoadActor("SoundStage");
};
Expand All @@ -16,13 +15,15 @@ t[#t+1] = Def.ActorFrame {
self:y(SCREEN_CENTER_Y);
end;
-- Door sound
LoadActor(GetMenuMusicPath "stage" ) .. {
Def.Sound{
File=GetMenuMusicPath "stage",
OnCommand=function(self) self:sleep(0.25):queuecommand("Play") end,
PlayCommand=function(self)
self:play();
end;
};
LoadActor(THEME:GetPathS( "", "_Cheer" ) ) .. {
Def.Sound{
File=THEME:GetPathS( "", "_Cheer" ),
OnCommand=function(self)
if ThemePrefs.Get("MenuMusic") ~= "leeium" then
self:sleep(0.2):queuecommand("Play")
Expand All @@ -37,36 +38,33 @@ t[#t+1] = Def.ActorFrame {
OnCommand=function(s)
s:sleep(2.5):linear(0.2):diffusealpha(1):zoom(0.9):linear(0.1):zoom(1):sleep(3)
end,
BeginCommand=function(s)
if GAMESTATE:IsCourseMode() then
local ent = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber()):GetTrailEntries()
s:GetChild("Actual Jacket"):Load(jk.GetSongGraphicPath(ent[1]:GetSong()))
s:GetChild("Blend Jacket"):Load(jk.GetSongGraphicPath(ent[1]:GetSong()))
else
s:GetChild("Actual Jacket"):Load(jk.GetSongGraphicPath(GAMESTATE:GetCurrentSong()))
s:GetChild("Blend Jacket"):Load(jk.GetSongGraphicPath(GAMESTATE:GetCurrentSong()))
end
s:GetChild("Actual Jacket"):scaletofit(-310,-310,310,310)
s:GetChild("Blend Jacket"):scaletofit(-310,-310,310,310)
end,
OnCommand=function(s)
s:GetChild("Blend Jacket"):sleep(2.7):diffusealpha(0.5):linear(0.5):zoom(2):diffusealpha(0)
end,
Def.Quad{
InitCommand=function(s) s:diffuse(Color.Black)
s:setsize(628,628)
end,
};
Def.Sprite {
OnCommand=function(s)
if GAMESTATE:IsCourseMode() then
local ent = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber()):GetTrailEntries()
s:Load(jk.GetSongGraphicPath(ent[1]:GetSong()))
else
s:Load(jk.GetSongGraphicPath(GAMESTATE:GetCurrentSong()))
end
s:scaletofit(-310,-310,310,310)
end,
Name="Actual Jacket",
};
Def.Sprite {
BeginCommand=function(s)
s:blend(Blend.Add)
if GAMESTATE:IsCourseMode() then
local ent = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber()):GetTrailEntries()
s:Load(jk.GetSongGraphicPath(ent[1]:GetSong())):setsize(620,620)
else
s:Load(jk.GetSongGraphicPath(GAMESTATE:GetCurrentSong())):setsize(620,620)

end
s:diffusealpha(0)
end,
OnCommand=function(s)
s:sleep(2.7):diffusealpha(0.5):linear(0.5):zoom(2):diffusealpha(0)
Name="Blend Jacket",
InitCommand=function(s)
s:blend(Blend.Add):diffusealpha(0)
end,
};
};
Expand All @@ -76,15 +74,15 @@ for _, pn in pairs(GAMESTATE:GetEnabledPlayers()) do
if not GAMESTATE:IsCourseMode() then
t[#t+1] = LoadActor("record", pn)
end
t[#t+1] = Def.Actor{
--[[t[#t+1] = Def.Actor{
OnCommand=function(self)
if GAMESTATE:GetPlayMode() == "PlayMode_Oni" or GAMESTATE:IsExtraStage() then
GAMESTATE:ApplyPreferredModifiers(pn,"4 lives,battery,failimmediate")
elseif GAMESTATE:IsExtraStage2() then
GAMESTATE:ApplyPreferredModifiers(pn,"1 lives,battery,failimmediate")
end
end;
};
};]]
end

return t
2 changes: 1 addition & 1 deletion BGAnimations/ScreenStageInformation underlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local Handle = RageFileUtil.CreateRageFile();
local pass = Handle:Open(THEME:GetCurrentThemeDirectory().."NowPlaying.txt", 2);
local song = GAMESTATE:GetCurrentSong():GetDisplayMainTitle();
local art = GAMESTATE:GetCurrentSong():GetDisplayArtist();
local diff = GAMESTATE:GetCurrentSteps(PLAYER_1)
local diff = GAMESTATE:GetCurrentSteps(GAMESTATE:GetMasterPlayerNumber())
local diffname = diff:GetDifficulty()
local meter = diff:GetMeter()
if pass then
Expand Down

0 comments on commit c89a57d

Please sign in to comment.