uses GAMESTATE:SetJukeboxUsesModifiers to randomize modifiers for every song (not only 1st one)

This commit is contained in:
Vecais Dumais Laacis
2007-09-12 14:56:38 +00:00
parent 00f55cefdc
commit 1e65dc956b
3 changed files with 39 additions and 1 deletions
@@ -60,6 +60,41 @@ OptionRowTable =
end
}
function OptionsRandomJukebox()
local function AllChoices()
Trace('all choices');
local ret = { }
ret[1] = 'Off';
ret[2] = 'Random';
return ret
end
local t =
{
-- Name is used to retrieve the header and explanation text.
Name = "OptionsRandomJukebox";
LayoutType = "ShowAllInRow";
SelectType = "SelectOne";
OneChoiceForAllPlayers = true;
ExportOnChange = false;
Choices = AllChoices();
LoadSelections = function(self, list, pn)
list[1] = true
end;
SaveSelections = function(self, list, pn)
local val;
if list[1] then
val = false;
else
val = true;
end
GAMESTATE:SetJukeboxUsesModifiers(val);
end;
};
setmetatable( t, t );
return t;
end
-- (c) 2005 Glenn Maynard
-- All rights reserved.
--