Previous commit broke some stuff... This fixes it.
authorCameron Ball <c.ball1729@gmail.com>
Tue, 10 Dec 2013 05:13:49 +0000 (13:13 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Tue, 10 Dec 2013 05:13:49 +0000 (13:13 +0800)
Themes/GrooveNights/Scripts/Globals.lua
Themes/GrooveNights/Scripts/Other.lua

index 6d3c608..ccd2883 100644 (file)
@@ -31,20 +31,13 @@ Then if you wanted to use the song length actor on the options screen, you can
 access it like this:\r
 \r
 local SongLength = GetGlobal("TotalTime")\r
-\r
-After which you can do any sort of actor goodness on it as per usual. EG:\r
-\r
-SongLength:GetText()\r
-SongLength:rainbow()\r
-\r
-etc\r
 ]]--\r
 \r
 local GlobalsTable = {}\r
 \r
 function RegisterGlobal(Actor, Name)\r
-       assert(GlobalsTable[Name] == nil, "Cannot register actor ".. name .. ". It has already been registered")\r
-       GlobalsTable[Name] = Actor\r
+       assert(GlobalsTable[Name] == nil, "Cannot register actor ".. Name .. ". It has already been registered")\r
+       GlobalsTable[Name] = Actor:GetText()\r
 end\r
 \r
 function GetGlobal(Name)\r
index 59e6f08..372f57f 100644 (file)
@@ -430,9 +430,9 @@ end
 
 function oitgACoptions()
     -- Right now we return the same line names for both OITG and whatever else happens to be running. But in the future they might be different.
-    if OPENITG then return "1,2,3,4,5,6,7,8,9,10,11,12" end
+    if OPENITG then return "1,2,3,4,5,6,7,8,9,10,11" end
 
-    return "1,2,3,4,5,6,7,8,9,10,11,12"
+    return "1,2,3,4,5,6,7,8,9,10,11"
 end
 
 function SongModifiers()
@@ -492,7 +492,8 @@ function DisplayScrollSpeed(pn)
 end
 
 function DisplaySongLength()
-       local SongLength = GetGlobal("TotalTime"):GetText()
+       local SongLength = GetGlobal("TotalTime")
+
        local RateMod = string.gsub(GetRateMod(), "x" ,"")
        local ratio = 1/RateMod
        
@@ -501,6 +502,6 @@ function DisplaySongLength()
        local seconds = string.sub(SongLength, pos+1)
        
        seconds = (seconds + (minutes*60))*ratio
-       
+
        return string.format("%.2d:%.2d", math.mod(seconds/60,60), math.mod(seconds,60))
 end
\ No newline at end of file