From b1e4b45b8607ab4e3110dd02987cc48d8dd81de3 Mon Sep 17 00:00:00 2001 From: Jousway Date: Sat, 23 Sep 2017 09:46:27 +0200 Subject: [PATCH] Adding more Noteskin features. Added "Overlay Receptor" which is above tapnotes. Added "Underlay Receptor" which is under tapnotes. Added this because it uses "Receptor" as fallback and "Receptor" shouldnt be overwritten. Added "Held Explosion Dim" and "Held Explosion Bright". Makes it easier for users to define which explosion they want after the hold ended. At the moment it only supports Dance Single, Can add more support if requested. --- .../common/common/Fallback Explosion.lua | 13 ++++++++ .../common/Fallback Held Explosion Bright.lua | 1 + .../common/Fallback Held Explosion Dim.lua | 1 + .../common/Fallback Overlay Receptor.redir | 1 + .../common/common/Fallback Overlayceptor.lua | 31 +++++++++++++++++++ .../common/Fallback Underlay Receptor.redir | 1 + .../common/common/_Tap Lead-in Receptor.lua | 7 +++++ ...eceptor.lua => Down Underlay Receptor.lua} | 0 8 files changed, 55 insertions(+) create mode 100644 NoteSkins/common/common/Fallback Held Explosion Bright.lua create mode 100644 NoteSkins/common/common/Fallback Held Explosion Dim.lua create mode 100644 NoteSkins/common/common/Fallback Overlay Receptor.redir create mode 100644 NoteSkins/common/common/Fallback Overlayceptor.lua create mode 100644 NoteSkins/common/common/Fallback Underlay Receptor.redir rename NoteSkins/dance/default/{Down Receptor.lua => Down Underlay Receptor.lua} (100%) diff --git a/NoteSkins/common/common/Fallback Explosion.lua b/NoteSkins/common/common/Fallback Explosion.lua index 609212d64a..d0cfe86ba0 100644 --- a/NoteSkins/common/common/Fallback Explosion.lua +++ b/NoteSkins/common/common/Fallback Explosion.lua @@ -1,4 +1,5 @@ local t = Def.ActorFrame { + LoadActor(NOTESKIN:GetPath("Fallback", "Overlayceptor" )); NOTESKIN:LoadActor( Var "Button", "Hold Explosion" ) .. { HoldingOnCommand=NOTESKIN:GetMetricA("HoldGhostArrow", "HoldingOnCommand"); HoldingOffCommand=NOTESKIN:GetMetricA("HoldGhostArrow", "HoldingOffCommand"); @@ -16,6 +17,12 @@ local t = Def.ActorFrame { W3Command=NOTESKIN:GetMetricA("GhostArrowDim", "W3Command"); W2Command=NOTESKIN:GetMetricA("GhostArrowDim", "W2Command"); W1Command=NOTESKIN:GetMetricA("GhostArrowDim", "W1Command"); + JudgmentCommand=cmd(finishtweening); + BrightCommand=cmd(visible,false); + DimCommand=cmd(visible,true); + }; + NOTESKIN:LoadActor( Var "Button", "Held Explosion Dim" ) .. { + InitCommand=cmd(diffusealpha,0); HeldCommand=NOTESKIN:GetMetricA("GhostArrowDim", "HeldCommand"); JudgmentCommand=cmd(finishtweening); BrightCommand=cmd(visible,false); @@ -28,6 +35,12 @@ local t = Def.ActorFrame { W3Command=NOTESKIN:GetMetricA("GhostArrowBright", "W3Command"); W2Command=NOTESKIN:GetMetricA("GhostArrowBright", "W2Command"); W1Command=NOTESKIN:GetMetricA("GhostArrowBright", "W1Command"); + JudgmentCommand=cmd(finishtweening); + BrightCommand=cmd(visible,true); + DimCommand=cmd(visible,false); + }; + NOTESKIN:LoadActor( Var "Button", "Held Explosion Bright" ) .. { + InitCommand=cmd(diffusealpha,0); HeldCommand=NOTESKIN:GetMetricA("GhostArrowBright", "HeldCommand"); JudgmentCommand=cmd(finishtweening); BrightCommand=cmd(visible,true); diff --git a/NoteSkins/common/common/Fallback Held Explosion Bright.lua b/NoteSkins/common/common/Fallback Held Explosion Bright.lua new file mode 100644 index 0000000000..207dfc0657 --- /dev/null +++ b/NoteSkins/common/common/Fallback Held Explosion Bright.lua @@ -0,0 +1 @@ +return NOTESKIN:LoadActor( Var "Button", "Tap Explosion Bright" ); \ No newline at end of file diff --git a/NoteSkins/common/common/Fallback Held Explosion Dim.lua b/NoteSkins/common/common/Fallback Held Explosion Dim.lua new file mode 100644 index 0000000000..207dfc0657 --- /dev/null +++ b/NoteSkins/common/common/Fallback Held Explosion Dim.lua @@ -0,0 +1 @@ +return NOTESKIN:LoadActor( Var "Button", "Tap Explosion Bright" ); \ No newline at end of file diff --git a/NoteSkins/common/common/Fallback Overlay Receptor.redir b/NoteSkins/common/common/Fallback Overlay Receptor.redir new file mode 100644 index 0000000000..04b2ead777 --- /dev/null +++ b/NoteSkins/common/common/Fallback Overlay Receptor.redir @@ -0,0 +1 @@ +_blank \ No newline at end of file diff --git a/NoteSkins/common/common/Fallback Overlayceptor.lua b/NoteSkins/common/common/Fallback Overlayceptor.lua new file mode 100644 index 0000000000..daae2110dd --- /dev/null +++ b/NoteSkins/common/common/Fallback Overlayceptor.lua @@ -0,0 +1,31 @@ +local sButton = Var "Button" +local pn = Var "Player" + +local Buttons = { + ["Dance_Single"] = { + "Left", + "Down", + "Up", + "Right", + }, +} + +local getstyle = ToEnumShortString(GAMESTATE:GetCurrentStyle():GetStepsType()) + +print(getstyle) + +local t = Def.ActorFrame {} + +if sButton == Buttons[getstyle][1] then + fReceptor = {} + for i = 1,#Buttons[getstyle] do + t[#t+1] = NOTESKIN:LoadActor( Buttons[getstyle][i], "Overlay Receptor" )..{ + InitCommand=function(self) + self:x((i-1)*64) + fReceptor[Buttons[getstyle][i]] = self; + end; + } + end +end + +return t; \ No newline at end of file diff --git a/NoteSkins/common/common/Fallback Underlay Receptor.redir b/NoteSkins/common/common/Fallback Underlay Receptor.redir new file mode 100644 index 0000000000..04b2ead777 --- /dev/null +++ b/NoteSkins/common/common/Fallback Underlay Receptor.redir @@ -0,0 +1 @@ +_blank \ No newline at end of file diff --git a/NoteSkins/common/common/_Tap Lead-in Receptor.lua b/NoteSkins/common/common/_Tap Lead-in Receptor.lua index 39724c01eb..328119e48c 100644 --- a/NoteSkins/common/common/_Tap Lead-in Receptor.lua +++ b/NoteSkins/common/common/_Tap Lead-in Receptor.lua @@ -1,4 +1,11 @@ +local sButton = Var "Button"; + return Def.ActorFrame { + NOTESKIN:LoadActor(Var "Button", "Underlay Receptor") .. { + OnCommand=function() fReceptor[sButton]:queuecommand("On") end; + PressCommand=function() fReceptor[sButton]:queuecommand("Press") end; + LiftCommand=function() fReceptor[sButton]:queuecommand("Lift") end; + }; LoadActor( "_Tap Receptor", NOTESKIN:LoadActor(Var "Button", "Ready Receptor") ) .. { Frames = { { Frame = 2; Delay = 1; }; diff --git a/NoteSkins/dance/default/Down Receptor.lua b/NoteSkins/dance/default/Down Underlay Receptor.lua similarity index 100% rename from NoteSkins/dance/default/Down Receptor.lua rename to NoteSkins/dance/default/Down Underlay Receptor.lua