Removed some left over stuff from the old multi-line speed mod system and made the...
authorCameron Ball <c.ball1729@gmail.com>
Wed, 4 Dec 2013 03:06:58 +0000 (11:06 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Wed, 4 Dec 2013 03:07:37 +0000 (11:07 +0800)
Themes/GrooveNights/BGAnimations/ScreenPlayerOptions overlay/default.xml
Themes/GrooveNights/Languages/english.ini
Themes/GrooveNights/Scripts/GrooveNights.lua
Themes/GrooveNights/Scripts/Other.lua
Themes/GrooveNights/Scripts/gnSystem.lua
Themes/GrooveNights/metrics.ini

index 3a99aea..34184c6 100644 (file)
        <Layer Type="Quad"
        InitCommand="diffusealpha,0;sleep,0.01;queuecommand,CountDown;"
        CountDownCommand="%function(self)
-       self:stoptweening();
-       if PREFSMAN:GetPreference('MenuTimer') == 0 then
-       gnScreenPlayerOptionsTimer = 9999;
-       gnScreenSelectMusicTimer = 9999;
-               end
-       gnScreenPlayerOptionsTimer = gnScreenPlayerOptionsTimer - 0.1;
-       if gnScreenPlayerOptionsTimer <= 0 then
-               gnScreenPlayerOptionsTimer = 0;
-               end
-       if gnGoBack == nil then 
-               gnGoBack = 0;
-               end
-       if gnScreenSelectMusicTimer > 5 then    
-               if gnScreenPlayerOptionsTimer > 5 then  
-                       if gnGoBack == 2 then
-                               GAMESTATE:SetEnv('BackScreen','YES')
-                               else
-                               GAMESTATE:SetEnv('BackScreen','NO')
-                               end
-                       else
-                       gnGoBack = 3;
-                       GAMESTATE:SetEnv('BackScreen','NO')
-                       end
-       else
-               gnGoBack = 3;
-               GAMESTATE:SetEnv('BackScreen','NO')
-       end
-       self:sleep(0.1);
-       self:queuecommand('CountDown');
-       end"
+            self:stoptweening();
+            if PREFSMAN:GetPreference('MenuTimer') == 0 then
+                gnScreenPlayerOptionsTimer = 9999;
+                gnScreenSelectMusicTimer = 9999;
+            end
+            
+            gnScreenPlayerOptionsTimer = gnScreenPlayerOptionsTimer - 0.1;
+
+            self:sleep(0.1);
+            self:queuecommand('CountDown');
+            end"
        />
-<!--Activate the Back Button-->
+
                <BitmapText
                        Text=""
                        File="_eurostile blue glow"
index 426576c..43f2fdf 100644 (file)
@@ -388,7 +388,7 @@ Beat=Beat
 Flip=Flip
 HideBG=Hide&nbsp;BG
 AddSpeed=Add&nbsp;Speed
-GoBack=Go&nbsp;Back?
+BackButton=Go Back?
 Foreground=Foreground
 Stamina=Stamina
 
index b1a8e02..d2bfb31 100644 (file)
@@ -61,14 +61,7 @@ function getMaxStatFrequency()
        return 8
 end
 
-
--- ===CHANGE SPEED, ADDSPEED & RATE MODS===
-SpeedMods = { "1x", "1.5x", "2x", "2.5x", "3x", "3.5x", "4x", "4.5x", "5x", "5.5x", "6x", "c420", "c600", "c660" }
-AddSpeedMods = { "0", "+0.25x", "+0.5x", "+0.75x", "+c25", "+c50", "+c75", "+c100" }
-Rate = { "1.0x", "1.1x", "1.2x", "1.3x", "1.4x", "1.5x", "1.6x", "1.7x", "2.0x"}
-
-
-
+Rate = { "1.0x", "1.1x", "1.2x", "1.3x", "1.4x", "1.5x", "1.6x", "1.7x", "2.0x" }
 
 
 -- ===CHANGE MACHINE LOCATION TEXT===
@@ -1172,40 +1165,20 @@ end
 
 -- This controls the 'Go Back' button... You should probably just leave it alone.
 
-Back = { "NO", "YES"}
-
-function GoBack()
-       gnGoBack = 0;
-       local ModList = Back
-       local t = {
-               Name = "GoBack",
-               LayoutType = "ShowAllInRow",
-               SelectType = "SelectOne",
-               OneChoiceForAllPlayers = true,
-               ExportOnChange = false,
-               Choices = ModList,
-
-               LoadSelections = function(self, list, pn)
-               list[1] = true;
-               list[2] = false; 
-               end,
-
-               SaveSelections = function(self, list, pn)
-               p = pn + 1;
-               for n = 1, table.getn(ModList) do
-                       if list[n] then
-                               s = ModList[n];
-                               end
-               end
-               if s == 'YES' then
-                       gnGoBack = 2;
-                       else
-                       gnGoBack = 1;
-                       end
-               end
-       }
-       setmetatable(t, t)
-       return t
+function BackButton()
+    local function Load(self, list, pn) end
+    local function Save(self, list, pn)
+        if list[1] and (gnScreenSelectMusicTimer > 5) and (gnScreenPlayerOptionsTimer > 5) then
+            SCREENMAN:SetNewScreen('ScreenSelectMusic') 
+        elseif list[1] then
+            SCREENMAN:SystemMessage('Not Enough Time Left to Go Back!') 
+        end
+    end
+
+    local Names = {'Return to Music Selection'}
+    local Params = { Name = "BackButton", SelectType = "SelectMultiple", OneChoiceForAllPlayers = GAMESTATE:IsPlayerEnabled(PLAYER_1) }
+    
+    return CreateOptionRow(Params, Names, Load, Save)
 end
 
 -- This sets the menu timer to its last recorded value so that you can't cheat the menus
@@ -1246,10 +1219,6 @@ end
 
 
 
-
-
-
-
 function RateMod()
        local ModList = Rate
        local t = {
@@ -1292,279 +1261,6 @@ end
 
 
 
-
-
-function SpeedMod()
-       local ModList = SpeedMods
-       local t = {
-               Name = "Speed",
-               LayoutType = "ShowAllInRow",
-               SelectType = "SelectOne",
-               OneChoiceForAllPlayers = false,
-               ExportOnChange = false,
-               Choices = ModList,
-
-               LoadSelections = function(self, list, pn)
-               for n = 1, table.getn(ModList) do
-                       s = string.sub(ModList[n],1,1);
-                       if s == 'c' then
-                               s = string.gsub(ModList[n], "c", "");
-                               s = tonumber(s);
-                               for t = 0, 200, 50 do
-                                       for k = 0, table.getn(ModList), 1 do
-                                               if k < table.getn(ModList) then
-                                                       l = string.gsub(ModList[k+1], "x", "");
-                                                       l = string.gsub(l, "c", "");
-                                                       l = tonumber(l);
-                                                       else
-                                                       l = 100;
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..l) then
-                                                       HigherMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..l+t) then
-                                                       HigherMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..s+t) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+5)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+10)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+15)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+20)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+25)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+30)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+35)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+40)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,'c'..(s+t+45)) then
-                                                       GotMod = true;
-                                                       break
-                                                       end
-                                               end
-                                               if HigherMod then
-                                                       break
-                                                       end
-                                               if GotMod then
-                                                       break
-                                                       end
-                                               end
-                               else
-                               s = string.gsub(ModList[n], "x", "");
-                               s = tonumber(s);
-                               for t = 0, 400, 1 do
-                                       if t < 99 then
-                                               if t < 10 then
-                                                       t = '0.0'..t
-                                                       else
-                                                       t = '0.'..t
-                                                       end
-                                               end
-                                       t = string.sub(t,1,4)
-                                       t = tonumber(t);
-                                       if GAMESTATE:PlayerIsUsingModifier(pn,s..'x') then
-                                               GotMod = true;
-                                               break
-                                               end
-                                       for k = 0, table.getn(ModList), 1 do
-                                               if k < table.getn(ModList) then
-                                                       l = string.gsub(ModList[k+1], "x", "");
-                                                       l = string.gsub(l, "c", "");
-                                                       l = tonumber(l);
-                                                       else
-                                                       l = 1;
-                                                       end
-                                               Trace("base")
-                                               Trace(s)
-                                               Trace("+ Addspeed")
-                                               Trace(t)
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,s+t..'x') then
-                                                       GotMod = true;
-                                                       Trace('yolo')
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,l..'x') then
-                                                       HigherMod = true;
-                                                       break
-                                                       end
-                                               if GAMESTATE:PlayerIsUsingModifier(pn,l+t..'x') then
-                                                       HigherMod = true;
-                                                       break
-                                                       end
-                                               end
-                                               t = t * 100;
-                                               if HigherMod then
-                                                       break
-                                                       end
-                                               if GotMod then
-                                                       break
-                                                       end
-                                       end
-                               end
-                       HigherMod = false;
-                       if GotMod then
-                               GotMod = false;
-                               list[n] = true;
-                               break
-                               else
-                               list[n] = false ;
-                               end
-                       end
-               end,
-
-               SaveSelections = function(self, list, pn)
-               p = pn + 1;
-               for n = 1, table.getn(ModList) do
-                       if list[n] then
-                               s = n;
-                               end
-               end
-               m = string.gsub(SpeedMods[s], "x", "");
-               m = string.gsub(m, "c", "");
-               m = tonumber(m);
-               gnT = string.sub(ModList[s],1,1);
-               
-               if gnT == 'c' then
-                       if p == 1 then
-                               modStyleP1 = 2
-                               else
-                               modStyleP2 = 2
-                               end
-                       else
-                       if p == 1 then
-                               modStyleP1 = 1
-                               else
-                               modStyleP2 = 1
-                               end
-                       end
-                       
-               if p == 1 then
-                       setModP1 = string.gsub(SpeedMods[s], "x", "");
-                       setModP1 = string.gsub(setModP1, "c", "");
-                       setModP1 = tonumber(setModP1);
-                       else
-                       setModP2 = string.gsub(SpeedMods[s], "x", "");
-                       setModP2 = string.gsub(setModP2, "c", "");
-                       setModP2 = tonumber(setModP2);
-                       end
-               
-               ModSpeed = m;
-               GAMESTATE:ApplyGameCommand('mod, no invert',p);
-               GAMESTATE:ApplyGameCommand('mod,'..(ModSpeed/10000)..'% invert',p);
-               GAMESTATE:SetEnv('SpeedMod','1');
-               end
-       }
-       setmetatable(t, t)
-       return t
-end
-
-
-
-function AddSpeedMod()
-       local ModList = AddSpeedMods
-       local t = {
-               Name = "AddSpeed",
-               LayoutType = "ShowAllInRow",
-               SelectType = "SelectOne",
-               OneChoiceForAllPlayers = false,
-               ExportOnChange = false,
-               Choices = ModList,
-
-               LoadSelections = function(self, list, pn)
-               for n = 1, table.getn(ModList) do
-               s = string.gsub(AddSpeedMods[n], "c", "");
-               s = string.gsub(s, "+", "");
-               s = string.gsub(s, "x", "");
-               s = tonumber(s);
-               if s == nil then s = 0; end
-               if s == 0 then
-                       s = "no"
-                       else
-                       if s > 10 then
-                               if s > 99 then
-                                       s = "-"..(s/100).."%"
-                                       else
-                                       s = "-0."..s.."%"
-                                       end
-                               else
-                               s = s.."%"
-                               end
-                       end
-                       if GAMESTATE:PlayerIsUsingModifier(pn,s..' split') then
-                               list[n] = true; 
-                               else 
-                               list[n] = false ;
-                               end
-                       end
-               end,
-
-               SaveSelections = function(self, list, pn)
-               p = pn + 1;
-               for n = 1, table.getn(ModList) do
-                       if list[n] then
-                               s = n;
-                               end
-               end
-               if p == 1 then
-                       addModP1 = string.gsub(AddSpeedMods[s], "c", "");
-                       addModP1 = string.gsub(addModP1, "+", "");
-                       addModP1 = string.gsub(addModP1, "x", "");
-                       addModP1 = tonumber(addModP1);
-                       else
-                       addModP2 = string.gsub(AddSpeedMods[s], "c", "");
-                       addModP2 = string.gsub(addModP2, "+", "");
-                       addModP2 = string.gsub(addModP2, "x", "");
-                       addModP2 = tonumber(addModP2);
-                       end
-                       
-               ModAddSpeed = string.gsub(AddSpeedMods[s], "c", "");
-               ModAddSpeed = string.gsub(ModAddSpeed, "+", "");
-               ModAddSpeed = string.gsub(ModAddSpeed, "x", "");
-               ModAddSpeed = tonumber(ModAddSpeed);
-               if ModAddSpeed > 10 then
-                       ModAddSpeed = ((ModAddSpeed/100)*-1).."%"
-                       else
-                       ModAddSpeed = ModAddSpeed.."%"
-                       end
-                       
-               GAMESTATE:ApplyGameCommand('mod, no split',p);
-               GAMESTATE:ApplyGameCommand('mod,'..ModAddSpeed..' split',p);
-               GAMESTATE:SetEnv('AddSpeedMod','1');
-               end
-       }
-       setmetatable(t, t)
-       return t
-end
-
-
-
-
 -- Stamina Mod
 StaminaMods = { 0, 0.01, 0.02, 0.03, 0.04, 0.05 }
 Stamina = { "None", "Aoreo", "Jayce", "SteveReen", "WinDEU", "Zetorux" }
index e4f8c04..6929e2d 100644 (file)
@@ -581,8 +581,6 @@ function ApplySpeedMods()
 end
 
 function InitSpeedMods()
-    Trace("Got in to initspeedmods")
-
     modBase = { "1", "1" }
     modExtra = { "+.5", "+.5" }
     modType = { "x-mod", "x-mod" }
index 405b5b3..6e3fe63 100644 (file)
@@ -149,7 +149,6 @@ if scn == 'ScreenSelectMusic' then
                gnRateRestore = 0;
                end
        if curRate == nil then curRate = 1 end
-       gnGoBack = 0;
        gnBlazedP1 = 0;
        gnBlazedP2 = 0;
        gnP1Ready = 0;
index 054c3d9..54ddbd0 100644 (file)
@@ -4050,7 +4050,7 @@ Line19=list,Foreground
 Line20=list,InsertTaps
 Line21=list,Hide
 Line22=list,HideBG
-Line23=lua,GoBack()
+Line23=lua,BackButton()
 Line24=list,Steps
 #Removed from GrooveNights
 Line25=lua,StaminaMod()