From 6cc329a7eab122899a8beac3a2841a8d9ef0720b Mon Sep 17 00:00:00 2001 From: ListenerJubatus Date: Mon, 17 Sep 2018 16:31:13 -0600 Subject: [PATCH] Correct accidental use of global vars --- .../ScreenEvaluation underlay/default.lua | 4 ++-- .../ScreenGameplay overlay/default.lua | 8 ++++---- .../ScreenNetSelectMusic decorations.lua | 8 ++++---- .../ScreenSelectMusic decorations/default.lua | 16 ++++++++-------- .../ScreenStageInformation underlay/default.lua | 8 ++++---- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Themes/default/BGAnimations/ScreenEvaluation underlay/default.lua b/Themes/default/BGAnimations/ScreenEvaluation underlay/default.lua index 35a04fd6a8..5e88b08b22 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation underlay/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation underlay/default.lua @@ -341,7 +341,7 @@ if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set"); ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -379,7 +379,7 @@ if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set"); ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then diff --git a/Themes/default/BGAnimations/ScreenGameplay overlay/default.lua b/Themes/default/BGAnimations/ScreenGameplay overlay/default.lua index c421c5cb1d..30c709a20e 100644 --- a/Themes/default/BGAnimations/ScreenGameplay overlay/default.lua +++ b/Themes/default/BGAnimations/ScreenGameplay overlay/default.lua @@ -117,7 +117,7 @@ t.InitCommand=cmd(SetUpdateFunction,UpdateTime); OnCommand=cmd(playcommand,"Set"); CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -135,7 +135,7 @@ t.InitCommand=cmd(SetUpdateFunction,UpdateTime); CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set"); ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -159,7 +159,7 @@ t.InitCommand=cmd(SetUpdateFunction,UpdateTime); OnCommand=cmd(playcommand,"Set"); CurrentstepsP2ChangedMessageCommand=cmd(playcommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then @@ -177,7 +177,7 @@ t.InitCommand=cmd(SetUpdateFunction,UpdateTime); CurrentstepsP2ChangedMessageCommand=cmd(playcommand,"Set"); ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then diff --git a/Themes/default/BGAnimations/ScreenNetSelectMusic decorations.lua b/Themes/default/BGAnimations/ScreenNetSelectMusic decorations.lua index b6e44636f1..215e78fa6c 100644 --- a/Themes/default/BGAnimations/ScreenNetSelectMusic decorations.lua +++ b/Themes/default/BGAnimations/ScreenNetSelectMusic decorations.lua @@ -185,7 +185,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -210,7 +210,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -235,7 +235,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -260,7 +260,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then diff --git a/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua b/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua index 0936f5c0ad..56c2aa9181 100644 --- a/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua @@ -207,7 +207,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -232,7 +232,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -257,7 +257,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -282,7 +282,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -317,7 +317,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then @@ -342,7 +342,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then @@ -367,7 +367,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then @@ -392,7 +392,7 @@ t[#t+1] = Def.ActorFrame { PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75); ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set"); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then diff --git a/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua b/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua index 04a9c9f6fc..c4b8970e0b 100644 --- a/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua +++ b/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua @@ -85,7 +85,7 @@ t[#t+1] = Def.ActorFrame { LoadFont("Common Italic Condensed") .. { OnCommand=cmd(playcommand,"Set";horizalign,left;diffuse,color("#FFFFFF")); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1:GetAuthorCredit() ~= "" then @@ -102,7 +102,7 @@ t[#t+1] = Def.ActorFrame { InitCommand=cmd(addy,22); OnCommand=cmd(playcommand,"Set";horizalign,left;zoom,0.75;diffuse,color("#FFFFFF")); SetCommand=function(self) - stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) + local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP1 ~= nil then @@ -125,7 +125,7 @@ t[#t+1] = Def.ActorFrame { LoadFont("Common Italic Condensed") .. { OnCommand=cmd(playcommand,"Set";horizalign,right;diffuse,color("#FFFFFF")); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then local diff = stepsP2:GetDifficulty(); @@ -144,7 +144,7 @@ t[#t+1] = Def.ActorFrame { InitCommand=cmd(addy,22); OnCommand=cmd(playcommand,"Set";horizalign,right;zoom,0.75;diffuse,color("#FFFFFF")); SetCommand=function(self) - stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) + local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local song = GAMESTATE:GetCurrentSong(); if song then if stepsP2 ~= nil then