From 96650cc1565f69e4f702da97b951e43ad66ef4c9 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 25 Mar 2009 08:03:46 +0000 Subject: [PATCH] Load the actor for the current stage only and only show Event Mode during Regular play. --- .../ScreenStage decorations/default.lua | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/stepmania/Themes/default/BGAnimations/ScreenStage decorations/default.lua b/stepmania/Themes/default/BGAnimations/ScreenStage decorations/default.lua index 6f8e810a3e..1a2c95832e 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenStage decorations/default.lua +++ b/stepmania/Themes/default/BGAnimations/ScreenStage decorations/default.lua @@ -1,21 +1,18 @@ local t = Def.ActorFrame {}; +local InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;); t[#t+1] = LoadActor("horizon") .. { - InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;); + InitCommand=InitCommand; }; t[#t+1] = LoadActor("sun") .. { - InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;); + InitCommand=InitCommand; +}; +local pm = GAMESTATE:GetPlayMode(); +-- This relies on play modes and stages having the same naming for +-- everything but Regular. +local stage = pm == 'PlayMode_Regular' and GAMESTATE:GetCurrentStage() or + 'Stage_' .. string.sub(pm, 10); +t[#t+1] = LoadActor( stage ) .. { + InitCommand=InitCommand; + OnCommand=cmd(cropbottom,1;linear,0.5;cropbottom,0;sleep,10;); }; -local InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;); -local OnCommand=cmd(cropbottom,1;linear,0.5;cropbottom,0;sleep,10;); -local function AddChild( i ) - t[#t+1] = LoadActor( i ) .. { - InitCommand=InitCommand; - OnCommand=OnCommand; - Condition=GAMESTATE:GetCurrentStage() == i; - }; -end - -for i in ivalues(Stage) do - AddChild( i ); -end return t;