OnCommand="horizalign,left;zoom,0.65;rainbow;"
SpeedModChangedMessageCommand="queuecommand,Update"
RateModChangedMessageCommand="queuecommand,Update"
- UpdateCommand="%function(self) if IsBlazed(PLAYER_1) then self:diffusealpha(1) else self:diffusealpha(0) end end"
+ UpdateCommand="%function(self) if DoEasterEgg('BlazeIt', {pn = PLAYER_1}) then self:diffusealpha(1) else self:diffusealpha(0) end end"
/>
<!--No Scope P1 -->
OnCommand="horizalign,left;zoom,0.65;rainbow;"
SpeedModChangedMessageCommand="queuecommand,Update"
RateModChangedMessageCommand="queuecommand,Update"
- UpdateCommand="%function(self) if IsNoScoped(PLAYER_1) then self:diffusealpha(1) else self:diffusealpha(0) end end"
+ UpdateCommand="%function(self) if DoEasterEgg('NoScope', {pn = PLAYER_1}) then self:diffusealpha(1) else self:diffusealpha(0) end end"
/>
<!--Step Artists P1-->
OnCommand="horizalign,left;zoom,0.65;rainbow;"
SpeedModChangedMessageCommand="queuecommand,Update"
RateModChangedMessageCommand="queuecommand,Update"
- UpdateCommand="%function(self) if IsBlazed(PLAYER_2) then self:diffusealpha(1) else self:diffusealpha(0) end end"
+ UpdateCommand="%function(self) if DoEasterEgg('BlazeIt', {pn = PLAYER_2}) then self:diffusealpha(1) else self:diffusealpha(0) end end"
/>
<!--No Scope P2 -->
OnCommand="horizalign,left;zoom,0.65;rainbow;"
SpeedModChangedMessageCommand="queuecommand,Update"
RateModChangedMessageCommand="queuecommand,Update"
- UpdateCommand="%function(self) if IsNoScoped(PLAYER_2) then self:diffusealpha(1) else self:diffusealpha(0) end end"
+ UpdateCommand="%function(self) if DoEasterEgg('NoScope', {pn = PLAYER_2}) then self:diffusealpha(1) else self:diffusealpha(0) end end"
/>
<!--Step Artists P2-->
-function IsBlazed(pn)\r
- if DisplayScrollSpeed(pn) == '420' then return true end\r
- \r
- return false\r
+-- This is purely for convenience\r
+local ProfileTable\r
+local FunctionTable = {}\r
+\r
+-- Without this check, when StepMania starts it will report a lua runtime error as PROFILEMAN apparently doesn't exist yet.\r
+if PROFILEMAN ~= nil then\r
+ ProfileTable = PROFILEMAN:GetMachineProfile():GetSaved()\r
+end\r
+\r
+-- Valid speed mod row type names.\r
+local choices = { "OFF", "ON" }\r
+\r
+local FunctionTable = {}\r
+\r
+function EasterEggsEnabled()\r
+ --Default to off\r
+ if ProfileTable.EasterEggs == nil then return false end\r
+\r
+ return ProfileTable.EasterEggs\r
+end\r
+\r
+function ToggleEasterEggs()\r
+ local function Load(self, list, pn)\r
+ if EasterEggsEnabled() then list[2] = true else list[1] = true end\r
+ end\r
+\r
+ local function Save(self, list, pn)\r
+ if list[1] then ProfileTable.EasterEggs = false else ProfileTable.EasterEggs = true end\r
+ PROFILEMAN:SaveMachineProfile()\r
+ return\r
+ end\r
+\r
+ local Params = { Name = "EasterEggs" }\r
+ return CreateOptionRow( Params, choices, Load, Save )\r
+end\r
+\r
+function RegisterEasterEgg(Name, fn)\r
+ FunctionTable[Name] = fn\r
end\r
\r
-function IsNoScoped(pn)\r
- if DisplayScrollSpeed(pn) == '360' then return true end\r
- \r
- return false\r
+function DoEasterEgg(Name, Params)\r
+ if EasterEggsEnabled() then\r
+ if FunctionTable[Name] ~= nil then return FunctionTable[Name](Params) end\r
+ end\r
end
\ No newline at end of file
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" end
+ if OPENITG then return "1,2,3,4,5,6,7,8,9,10,11,12" end
- return "1,2,3,4,5,6,7,8,9,10,11"
+ return "1,2,3,4,5,6,7,8,9,10,11,12"
end
function SongModifiers()
ProfileTable = PROFILEMAN:GetMachineProfile():GetSaved()\r
end\r
\r
- -- Valid speed mod row type names.\r
+-- Valid speed mod row type names.\r
local Names = { "Basic", "Advanced", "Pro" }\r
\r
function SpeedModTypeRow()\r
local Path = THEME:GetPath( EC_SOUNDS, 'gnScreenTransition', 'whoosh '..i );
SOUND:PlayOnce(Path);
end
+
+
+--easter eggs
+local function IsBlazed(Params)
+ if DisplayScrollSpeed(Params.pn) == '420' then return true end
+
+ return false
+end
+
+local function IsNoScoped(Params)
+ if DisplayScrollSpeed(Params.pn) == '360' then return true end
+
+ return false
+end
+
+RegisterEasterEgg("BlazeIt", IsBlazed)
+RegisterEasterEgg("NoScope", IsNoScoped)
\ No newline at end of file
Line9=conf,DefaultFailType
Line10=conf,Theme
Line11=lua,SpeedModTypeRow()
+Line12=lua,ToggleEasterEggs()
[ScreenGraphicOptions]
Fallback=ScreenOptionsSubmenu