PartyMode Challenge: Made the amount of jokers configurable
This commit is contained in:
1 parent
d96759555a
commit
970610327c
5 files changed
+77
-33
No files matched your search
@@ -113,6 +113,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
public int NumPlayer;
|
||||
public int NumPlayerAtOnce;
|
||||
public int NumRounds;
|
||||
public int NumJokers;
|
||||
public List<int> ProfileIDs;
|
||||
|
||||
public CChallengeRounds Rounds;
|
||||
@@ -147,7 +148,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_ScreenSongOptions.Sorting.SearchActive = false;
|
||||
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
|
||||
|
||||
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, CurrentRoundNr = 1, ProfileIDs = new List<int>(), CatSongIndices = null, Results = null};
|
||||
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, NumJokers = 5, CurrentRoundNr = 1, ProfileIDs = new List<int>(), CatSongIndices = null, Results = null};
|
||||
}
|
||||
|
||||
public override bool Init()
|
||||
@@ -373,35 +374,11 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
|
||||
private void _SetNumJokers()
|
||||
{
|
||||
switch (GameData.NumPlayerAtOnce)
|
||||
{
|
||||
case 1:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {10};
|
||||
break;
|
||||
int[] jokers = new int[GameData.NumPlayerAtOnce];
|
||||
for (int i = 0; i < jokers.Length; i++)
|
||||
jokers[i] = GameData.NumJokers;
|
||||
|
||||
case 2:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
|
||||
break;
|
||||
|
||||
case 3:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {4, 4, 4};
|
||||
break;
|
||||
|
||||
case 4:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {3, 3, 3, 3};
|
||||
break;
|
||||
|
||||
case 5:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2};
|
||||
break;
|
||||
|
||||
case 6:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2, 2};
|
||||
break;
|
||||
default:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
|
||||
break;
|
||||
}
|
||||
_ScreenSongOptions.Selection.NumJokers = jokers;
|
||||
}
|
||||
|
||||
private void _SetTeamNames()
|
||||
|
||||
@@ -27,12 +27,13 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 1; }
|
||||
get { return 2; }
|
||||
}
|
||||
|
||||
private const string _SelectSlideNumPlayers = "SelectSlideNumPlayers";
|
||||
private const string _SelectSlideNumMics = "SelectSlideNumMics";
|
||||
private const string _SelectSlideNumRounds = "SelectSlideNumRounds";
|
||||
private const string _SelectSlideNumJokers = "SelectSlideNumJokers";
|
||||
private const string _ButtonNext = "ButtonNext";
|
||||
private const string _ButtonBack = "ButtonBack";
|
||||
|
||||
@@ -43,7 +44,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
{
|
||||
base.Init();
|
||||
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideNumPlayers, _SelectSlideNumMics, _SelectSlideNumRounds};
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideNumPlayers, _SelectSlideNumMics, _SelectSlideNumRounds, _SelectSlideNumJokers};
|
||||
_ThemeButtons = new string[] {_ButtonNext, _ButtonBack};
|
||||
}
|
||||
|
||||
@@ -123,6 +124,14 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_SelectSlides[_SelectSlideNumPlayers].AddValue(i.ToString());
|
||||
_SelectSlides[_SelectSlideNumPlayers].SelectedValue = _PartyMode.GameData.NumPlayer.ToString();
|
||||
|
||||
// build num joker slide 1 to 10
|
||||
_SelectSlides[_SelectSlideNumJokers].Clear();
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
_SelectSlides[_SelectSlideNumJokers].AddValue(i.ToString());
|
||||
}
|
||||
_SelectSlides[_SelectSlideNumJokers].SelectedValue = "5";
|
||||
|
||||
_UpdateMicsAtOnce();
|
||||
_SetRoundSteps();
|
||||
_UpdateSlideRounds();
|
||||
@@ -135,6 +144,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_PartyMode.GameData.NumPlayer = _SelectSlides[_SelectSlideNumPlayers].Selection + _PartyMode.MinPlayers;
|
||||
_PartyMode.GameData.NumPlayerAtOnce = _SelectSlides[_SelectSlideNumMics].Selection + _PartyMode.MinPlayers;
|
||||
_PartyMode.GameData.NumRounds = (_SelectSlides[_SelectSlideNumRounds].Selection + 1) * _RoundSteps;
|
||||
_PartyMode.GameData.NumJokers = _SelectSlides[_SelectSlideNumJokers].Selection + 1;
|
||||
|
||||
_UpdateMicsAtOnce();
|
||||
_SetRoundSteps();
|
||||
|
||||
Reference in new issue
Block a user