Refactor PartyModes in preparation for a more unified name selection and maybe config
This commit is contained in:
1 parent
29dccbd8ae
commit
84e9163b96
22 files changed
+386
-426
No files matched your search
@@ -67,11 +67,38 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
public sealed class CPartyModeChallenge : CPartyMode
|
||||
// ReSharper restore ClassNeverInstantiated.Global
|
||||
{
|
||||
private const int _MaxPlayer = 12;
|
||||
private const int _MinPlayer = 1;
|
||||
private const int _MaxTeams = 0;
|
||||
private const int _MinTeams = 0;
|
||||
private const int _MaxNumRounds = 100;
|
||||
public override int MinMics
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
public override int MaxMics
|
||||
{
|
||||
get { return CBase.Config.GetMaxNumMics(); }
|
||||
}
|
||||
public override int MinPlayers
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
public override int MaxPlayers
|
||||
{
|
||||
get { return 12; }
|
||||
}
|
||||
public override int MinTeams
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
public override int MaxTeams
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
public override int MinPlayersPerTeam
|
||||
{
|
||||
get { return MinPlayers; }
|
||||
}
|
||||
public override int MaxPlayersPerTeam
|
||||
{
|
||||
get { return MaxPlayers; }
|
||||
}
|
||||
|
||||
private enum EStage
|
||||
{
|
||||
@@ -108,7 +135,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
public SData GameData;
|
||||
private EStage _Stage;
|
||||
|
||||
public CPartyModeChallenge(int id, string folder) : base(id, folder)
|
||||
public CPartyModeChallenge(int id) : base(id)
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
_ScreenSongOptions.Selection.PartyMode = true;
|
||||
@@ -125,6 +152,8 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
|
||||
public override bool Init()
|
||||
{
|
||||
if (!base.Init())
|
||||
return false;
|
||||
_Stage = EStage.Config;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
@@ -283,31 +312,6 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_ScreenSongOptions.Sorting.SearchActive = visible;
|
||||
}
|
||||
|
||||
public override int GetMaxPlayer()
|
||||
{
|
||||
return _MaxPlayer;
|
||||
}
|
||||
|
||||
public override int GetMinPlayer()
|
||||
{
|
||||
return _MinPlayer;
|
||||
}
|
||||
|
||||
public override int GetMaxTeams()
|
||||
{
|
||||
return _MaxTeams;
|
||||
}
|
||||
|
||||
public override int GetMinTeams()
|
||||
{
|
||||
return _MinTeams;
|
||||
}
|
||||
|
||||
public override int GetMaxNumRounds()
|
||||
{
|
||||
return _MaxNumRounds;
|
||||
}
|
||||
|
||||
public override void JokerUsed(int teamNr)
|
||||
{
|
||||
if (_ScreenSongOptions.Selection.NumJokers == null)
|
||||
|
||||
Reference in new issue
Block a user