fill names with the right data
This commit is contained in:
1 parent
311a631e00
commit
4fd98ee1a3
1 file changed
+30
-9
@@ -234,11 +234,12 @@ namespace Vocaluxe.PartyModes
|
|||||||
if (_Screens != null)
|
if (_Screens != null)
|
||||||
{
|
{
|
||||||
GameData.Rounds = new ChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
|
GameData.Rounds = new ChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
|
||||||
|
GameData.CurrentRoundNr = 0;
|
||||||
Screen.DataToScreen(ToScreenMain);
|
Screen.DataToScreen(ToScreenMain);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EStage.Main:
|
case EStage.Main:
|
||||||
AlternativeScreen = EScreens.ScreenSong;
|
//nothing to do
|
||||||
break;
|
break;
|
||||||
case EStage.Singing:
|
case EStage.Singing:
|
||||||
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
|
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
|
||||||
@@ -336,13 +337,26 @@ namespace Vocaluxe.PartyModes
|
|||||||
if (player.Length < GameData.NumPlayerAtOnce)
|
if (player.Length < GameData.NumPlayerAtOnce)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//TODO: set the right data
|
|
||||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||||
|
Combination c = GameData.Rounds.GetRound(GameData.CurrentRoundNr - 1);
|
||||||
|
|
||||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||||
{
|
{
|
||||||
player[i].Name = _ScreenSongOptions.Selection.TeamNames[i];
|
//default values
|
||||||
player[i].Difficulty = profiles[GameData.ProfileIDs[i]].Difficulty;
|
player[i].Name = "foobar";
|
||||||
player[i].ProfileID = GameData.ProfileIDs[i];
|
player[i].Difficulty = EGameDifficulty.TR_CONFIG_EASY;
|
||||||
|
player[i].ProfileID = -1;
|
||||||
|
|
||||||
|
//try to fill with the right data
|
||||||
|
if (c != null)
|
||||||
|
{
|
||||||
|
if (GameData.ProfileIDs[c.Player[i]] < profiles.Length)
|
||||||
|
{
|
||||||
|
player[i].Name = profiles[GameData.ProfileIDs[c.Player[i]]].PlayerName;
|
||||||
|
player[i].Difficulty = profiles[GameData.ProfileIDs[c.Player[i]]].Difficulty;
|
||||||
|
player[i].ProfileID = GameData.ProfileIDs[c.Player[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
||||||
@@ -358,6 +372,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
{
|
{
|
||||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
|
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
|
||||||
|
GameData.CurrentRoundNr++;
|
||||||
SetNumJokers();
|
SetNumJokers();
|
||||||
SetTeamNames();
|
SetTeamNames();
|
||||||
_Base.Graphics.FadeTo(EScreens.ScreenSong);
|
_Base.Graphics.FadeTo(EScreens.ScreenSong);
|
||||||
@@ -406,18 +421,24 @@ namespace Vocaluxe.PartyModes
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameData.NumPlayerAtOnce < 1 || GameData.NumPlayerAtOnce > 6 || GameData.ProfileIDs.Count < GameData.NumPlayerAtOnce || profiles.Length < GameData.NumPlayerAtOnce)
|
if (GameData.NumPlayerAtOnce < 1 || GameData.ProfileIDs.Count < GameData.NumPlayerAtOnce || profiles.Length < GameData.NumPlayerAtOnce)
|
||||||
{
|
{
|
||||||
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
|
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//TODO: set the right data
|
|
||||||
_ScreenSongOptions.Selection.TeamNames = new string[GameData.NumPlayerAtOnce];
|
_ScreenSongOptions.Selection.TeamNames = new string[GameData.NumPlayerAtOnce];
|
||||||
|
Combination c = GameData.Rounds.GetRound(GameData.CurrentRoundNr - 1);
|
||||||
|
|
||||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||||
{
|
{
|
||||||
if (GameData.ProfileIDs[i] < profiles.Length)
|
if (c != null)
|
||||||
_ScreenSongOptions.Selection.TeamNames[i] = profiles[GameData.ProfileIDs[i]].PlayerName;
|
{
|
||||||
|
if (GameData.ProfileIDs[c.Player[i]] < profiles.Length)
|
||||||
|
_ScreenSongOptions.Selection.TeamNames[i] = profiles[GameData.ProfileIDs[c.Player[i]]].PlayerName;
|
||||||
|
else
|
||||||
|
_ScreenSongOptions.Selection.TeamNames[i] = "foobar";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
_ScreenSongOptions.Selection.TeamNames[i] = "foobar";
|
_ScreenSongOptions.Selection.TeamNames[i] = "foobar";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user