New party mode: Team Survival (#914)
* Add team survival party mode A new party mode for two teams that only needs 2 microphones. In every duel one player of each team sings against one of the other team. Whoever loses a duel loses a heart, players without hearts are out, and the team whose players are all out loses. - Every player sings once per round before anyone sings again, the duels are drawn randomly - Teams of different sizes are possible, in the smaller team some players sing a second time per round - Hearts can be the same for everyone or set per player, to balance uneven teams or strong and weak singers - Up to 3 jokers per player to skip a song - On a tie, the duel is sung again - A lost heart is animated, and the winning team is celebrated at the end * Trigger CI rebuild --------- Co-authored-by: Florian Ostertag <flokuep@users.noreply.github.com>
This commit is contained in:
1 parent
5e449c7b01
commit
3810f75e04
22 files changed
+5032
No files matched your search
@@ -0,0 +1,769 @@
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.Utils;
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TeamSurvival
|
||||
{
|
||||
public class CSurvivalPlayer
|
||||
{
|
||||
public Guid ProfileId;
|
||||
public int Team;
|
||||
public int StartHearts;
|
||||
public int Hearts;
|
||||
public int Jokers;
|
||||
public int DuelsInPass;
|
||||
|
||||
public bool IsOut
|
||||
{
|
||||
get { return Hearts <= 0; }
|
||||
}
|
||||
}
|
||||
|
||||
public class CSurvivalDuel
|
||||
{
|
||||
public CSurvivalPlayer[] Players = new CSurvivalPlayer[2];
|
||||
public int[] Scores = new int[2];
|
||||
public int Loser = -1;
|
||||
}
|
||||
|
||||
public abstract class CPartyScreenTeamSurvival : CMenuParty
|
||||
{
|
||||
protected new CPartyModeTeamSurvival _PartyMode;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
_PartyMode = (CPartyModeTeamSurvival)base._PartyMode;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CPartyModeTeamSurvival : CPartyMode
|
||||
{
|
||||
public const int TeamCount = 2;
|
||||
public const int MaxHearts = 5;
|
||||
public const int MaxJokers = 3;
|
||||
public const int MaxPlayersInTeam = 8;
|
||||
|
||||
public override int MinMics
|
||||
{
|
||||
get { return TeamCount; }
|
||||
}
|
||||
public override int MaxMics
|
||||
{
|
||||
get { return CBase.Config.GetMaxNumMics(); }
|
||||
}
|
||||
public override int MinPlayers
|
||||
{
|
||||
get { return TeamCount; }
|
||||
}
|
||||
public override int MaxPlayers
|
||||
{
|
||||
get { return TeamCount * MaxPlayersInTeam; }
|
||||
}
|
||||
public override int MinTeams
|
||||
{
|
||||
get { return TeamCount; }
|
||||
}
|
||||
public override int MaxTeams
|
||||
{
|
||||
get { return TeamCount; }
|
||||
}
|
||||
public override int MinPlayersPerTeam
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
public override int MaxPlayersPerTeam
|
||||
{
|
||||
get { return MaxPlayersInTeam; }
|
||||
}
|
||||
|
||||
private enum EStage
|
||||
{
|
||||
Config,
|
||||
Songs,
|
||||
Names,
|
||||
Hearts,
|
||||
Main,
|
||||
SongSelection,
|
||||
Singing,
|
||||
MedleySinging
|
||||
}
|
||||
|
||||
public struct SData
|
||||
{
|
||||
public bool HeartsPerPlayer;
|
||||
public int NumHearts;
|
||||
public int NumJokers;
|
||||
public Dictionary<Guid, int> PlayerHearts;
|
||||
|
||||
public int NumPlayerTeam1;
|
||||
public int NumPlayerTeam2;
|
||||
public List<Guid> ProfileIdsTeam1;
|
||||
public List<Guid> ProfileIdsTeam2;
|
||||
|
||||
public ESongSource SongSource;
|
||||
public ESongSorting Sorting;
|
||||
public int CategoryIndex;
|
||||
public int PlaylistId;
|
||||
|
||||
public EGameMode GameMode;
|
||||
public int NumMedleySongs;
|
||||
|
||||
public List<CSurvivalPlayer> Players;
|
||||
public List<CSurvivalDuel> PassDuels;
|
||||
public int PassNr;
|
||||
public int DuelIndex;
|
||||
public int NumDuelsPlayed;
|
||||
public bool IsRematch;
|
||||
public CSurvivalDuel LastDecidedDuel;
|
||||
public int WinnerTeam;
|
||||
|
||||
public List<int> Songs;
|
||||
}
|
||||
|
||||
public SData GameData;
|
||||
private EStage _Stage;
|
||||
|
||||
public CPartyModeTeamSurvival(int id) : base(id)
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
_ScreenSongOptions.Selection.PartyMode = true;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] { 1, 1 };
|
||||
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
|
||||
|
||||
_ScreenSongOptions.Sorting.SearchString = string.Empty;
|
||||
_ScreenSongOptions.Sorting.SearchActive = false;
|
||||
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
|
||||
_ScreenSongOptions.Sorting.FilterPlaylistId = -1;
|
||||
|
||||
GameData = new SData
|
||||
{
|
||||
HeartsPerPlayer = false,
|
||||
NumHearts = 2,
|
||||
NumJokers = 1,
|
||||
PlayerHearts = new Dictionary<Guid, int>(),
|
||||
NumPlayerTeam1 = 2,
|
||||
NumPlayerTeam2 = 2,
|
||||
ProfileIdsTeam1 = new List<Guid>(),
|
||||
ProfileIdsTeam2 = new List<Guid>(),
|
||||
Sorting = CBase.Config.GetSongSorting(),
|
||||
SongSource = ESongSource.TR_SONGSOURCE_ALLSONGS,
|
||||
PlaylistId = 0,
|
||||
CategoryIndex = 0,
|
||||
GameMode = EGameMode.TR_GAMEMODE_NORMAL,
|
||||
NumMedleySongs = 5,
|
||||
Players = new List<CSurvivalPlayer>(),
|
||||
PassDuels = new List<CSurvivalDuel>(),
|
||||
WinnerTeam = -1,
|
||||
Songs = new List<int>()
|
||||
};
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
_Stage = EStage.Config;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
||||
_ScreenSongOptions.Selection.SongIndex = -1;
|
||||
_ScreenSongOptions.Selection.CategoryIndex = -1;
|
||||
|
||||
if (CBase.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
{
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Init()
|
||||
{
|
||||
if (!base.Init())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
SetDefaults();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void UpdateGame() { }
|
||||
|
||||
public bool IsFinished
|
||||
{
|
||||
get { return GameData.WinnerTeam >= 0; }
|
||||
}
|
||||
|
||||
public CSurvivalDuel CurrentDuel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsFinished || GameData.DuelIndex >= GameData.PassDuels.Count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return GameData.PassDuels[GameData.DuelIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public List<CSurvivalPlayer> GetTeam(int team)
|
||||
{
|
||||
return GameData.Players.Where(player => player.Team == team).ToList();
|
||||
}
|
||||
|
||||
public int GetStartHearts(Guid profileId)
|
||||
{
|
||||
int hearts;
|
||||
if (GameData.HeartsPerPlayer && GameData.PlayerHearts.TryGetValue(profileId, out hearts))
|
||||
{
|
||||
return hearts;
|
||||
}
|
||||
|
||||
return GameData.NumHearts;
|
||||
}
|
||||
|
||||
private IMenu _GetNextScreen()
|
||||
{
|
||||
switch (_Stage)
|
||||
{
|
||||
case EStage.Config:
|
||||
return _Screens["CPartyScreenTeamSurvivalConfig"];
|
||||
case EStage.Songs:
|
||||
return _Screens["CPartyScreenTeamSurvivalSongs"];
|
||||
case EStage.Names:
|
||||
return _Screens["CPartyScreenTeamSurvivalNames"];
|
||||
case EStage.Hearts:
|
||||
return _Screens["CPartyScreenTeamSurvivalHearts"];
|
||||
case EStage.Main:
|
||||
return _Screens["CPartyScreenTeamSurvivalMain"];
|
||||
case EStage.SongSelection:
|
||||
return CBase.Graphics.GetScreen(EScreen.Song);
|
||||
case EStage.Singing:
|
||||
case EStage.MedleySinging:
|
||||
return CBase.Graphics.GetScreen(EScreen.Sing);
|
||||
default:
|
||||
throw new ArgumentException("Invalid stage: " + _Stage);
|
||||
}
|
||||
}
|
||||
|
||||
private void _FadeToScreen()
|
||||
{
|
||||
CBase.Graphics.FadeTo(_GetNextScreen());
|
||||
}
|
||||
|
||||
public void Next()
|
||||
{
|
||||
switch (_Stage)
|
||||
{
|
||||
case EStage.Config:
|
||||
_Stage = EStage.Songs;
|
||||
break;
|
||||
case EStage.Songs:
|
||||
_Stage = EStage.Names;
|
||||
break;
|
||||
case EStage.Names:
|
||||
if (GameData.HeartsPerPlayer)
|
||||
{
|
||||
_Stage = EStage.Hearts;
|
||||
}
|
||||
else
|
||||
{
|
||||
_StartGame();
|
||||
}
|
||||
|
||||
break;
|
||||
case EStage.Hearts:
|
||||
_StartGame();
|
||||
break;
|
||||
case EStage.Main:
|
||||
if (CurrentDuel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GameData.GameMode == EGameMode.TR_GAMEMODE_MEDLEY)
|
||||
{
|
||||
_Stage = EStage.MedleySinging;
|
||||
_PrepareMedleyRound();
|
||||
}
|
||||
else
|
||||
{
|
||||
_Stage = EStage.SongSelection;
|
||||
_PrepareSongSelection();
|
||||
}
|
||||
|
||||
break;
|
||||
case EStage.SongSelection:
|
||||
_Stage = EStage.Singing;
|
||||
break;
|
||||
case EStage.MedleySinging:
|
||||
case EStage.Singing:
|
||||
_Stage = EStage.Main;
|
||||
_UpdateScores();
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException("Invalid stage: " + _Stage);
|
||||
}
|
||||
|
||||
_FadeToScreen();
|
||||
}
|
||||
|
||||
public void Back()
|
||||
{
|
||||
switch (_Stage)
|
||||
{
|
||||
case EStage.Config:
|
||||
CBase.Graphics.FadeTo(EScreen.Party);
|
||||
return;
|
||||
case EStage.Songs:
|
||||
_Stage = EStage.Config;
|
||||
break;
|
||||
case EStage.Names:
|
||||
_Stage = EStage.Songs;
|
||||
break;
|
||||
case EStage.Hearts:
|
||||
_Stage = EStage.Names;
|
||||
break;
|
||||
case EStage.Main:
|
||||
_Stage = GameData.HeartsPerPlayer ? EStage.Hearts : EStage.Names;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException("Invalid stage: " + _Stage);
|
||||
}
|
||||
|
||||
_FadeToScreen();
|
||||
}
|
||||
|
||||
public override IMenu GetStartScreen()
|
||||
{
|
||||
return _Screens["CPartyScreenTeamSurvivalConfig"];
|
||||
}
|
||||
|
||||
public override SScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
return _ScreenSongOptions;
|
||||
}
|
||||
|
||||
public override void OnSongChange(int songIndex, ref SScreenSongOptions screenSongOptions)
|
||||
{
|
||||
if (_ScreenSongOptions.Selection.SelectNextRandomSong && songIndex != -1)
|
||||
{
|
||||
_ScreenSongOptions.Selection.SelectNextRandomSong = false;
|
||||
}
|
||||
|
||||
_ScreenSongOptions.Selection.SongIndex = songIndex;
|
||||
|
||||
screenSongOptions = _ScreenSongOptions;
|
||||
}
|
||||
|
||||
public override void OnCategoryChange(int categoryIndex, ref SScreenSongOptions screenSongOptions)
|
||||
{
|
||||
if (categoryIndex != -1 || CBase.Config.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
{
|
||||
_ScreenSongOptions.Selection.SelectNextRandomSong = true;
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ScreenSongOptions.Selection.SongIndex = -1;
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
}
|
||||
|
||||
_ScreenSongOptions.Selection.CategoryIndex = categoryIndex;
|
||||
|
||||
screenSongOptions = _ScreenSongOptions;
|
||||
}
|
||||
|
||||
public override void SetSearchString(string searchString, bool visible)
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SearchString = searchString;
|
||||
_ScreenSongOptions.Sorting.SearchActive = visible;
|
||||
}
|
||||
|
||||
public override void JokerUsed(int teamNr)
|
||||
{
|
||||
if (_ScreenSongOptions.Selection.NumJokers == null || teamNr >= _ScreenSongOptions.Selection.NumJokers.Length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var duel = CurrentDuel;
|
||||
if (duel != null && duel.Players[teamNr].Jokers > 0)
|
||||
{
|
||||
duel.Players[teamNr].Jokers--;
|
||||
}
|
||||
|
||||
_ScreenSongOptions.Selection.NumJokers[teamNr]--;
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
|
||||
}
|
||||
|
||||
public override void SongSelected(int songId)
|
||||
{
|
||||
_PrepareRound(new int[] { songId });
|
||||
|
||||
Next();
|
||||
}
|
||||
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
for (var i = 0; i < CBase.Game.GetNumSongs(); i++)
|
||||
{
|
||||
CBase.Songs.AddPartySongSung(CBase.Game.GetSong(i).Id);
|
||||
}
|
||||
|
||||
Next();
|
||||
}
|
||||
|
||||
private void _StartGame()
|
||||
{
|
||||
_Stage = EStage.Main;
|
||||
CBase.Songs.ResetSongSung();
|
||||
|
||||
GameData.Players = new List<CSurvivalPlayer>();
|
||||
var teams = new List<Guid>[] { GameData.ProfileIdsTeam1, GameData.ProfileIdsTeam2 };
|
||||
for (var team = 0; team < TeamCount; team++)
|
||||
{
|
||||
foreach (var profileId in teams[team])
|
||||
{
|
||||
var hearts = GetStartHearts(profileId);
|
||||
GameData.Players.Add(new CSurvivalPlayer { ProfileId = profileId, Team = team, StartHearts = hearts, Hearts = hearts, Jokers = GameData.NumJokers });
|
||||
}
|
||||
}
|
||||
|
||||
GameData.PassNr = 0;
|
||||
GameData.NumDuelsPlayed = 0;
|
||||
GameData.IsRematch = false;
|
||||
GameData.LastDecidedDuel = null;
|
||||
GameData.WinnerTeam = -1;
|
||||
GameData.Songs = new List<int>();
|
||||
_StartPass();
|
||||
}
|
||||
|
||||
private void _StartPass()
|
||||
{
|
||||
GameData.PassNr++;
|
||||
GameData.DuelIndex = 0;
|
||||
GameData.PassDuels = new List<CSurvivalDuel>();
|
||||
|
||||
var teams = new List<CSurvivalPlayer>[TeamCount];
|
||||
var numDuels = 0;
|
||||
for (var team = 0; team < TeamCount; team++)
|
||||
{
|
||||
teams[team] = GetTeam(team).Where(player => !player.IsOut).ToList();
|
||||
teams[team].Shuffle();
|
||||
foreach (var player in teams[team])
|
||||
{
|
||||
player.DuelsInPass = 0;
|
||||
}
|
||||
|
||||
numDuels = Math.Max(numDuels, teams[team].Count);
|
||||
}
|
||||
|
||||
for (var i = 0; i < numDuels; i++)
|
||||
{
|
||||
GameData.PassDuels.Add(new CSurvivalDuel());
|
||||
}
|
||||
|
||||
for (var team = 0; team < TeamCount; team++)
|
||||
{
|
||||
var order = new List<CSurvivalPlayer>(teams[team]);
|
||||
while (order.Count < numDuels)
|
||||
{
|
||||
var extra = new List<CSurvivalPlayer>(teams[team]);
|
||||
extra.Shuffle();
|
||||
order.AddRange(extra);
|
||||
}
|
||||
|
||||
for (var i = 1; i < numDuels; i++)
|
||||
{
|
||||
if (order[i] != order[i - 1] || teams[team].Count < 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (var j = i + 1; j < order.Count; j++)
|
||||
{
|
||||
if (order[j] != order[i - 1] && (i + 1 >= numDuels || order[j] != order[i + 1]))
|
||||
{
|
||||
var swap = order[i];
|
||||
order[i] = order[j];
|
||||
order[j] = swap;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < numDuels; i++)
|
||||
{
|
||||
GameData.PassDuels[i].Players[team] = order[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CSurvivalPlayer _GetReplacement(int team)
|
||||
{
|
||||
var candidates = GetTeam(team).Where(player => !player.IsOut).ToList();
|
||||
if (candidates.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var minDuels = candidates.Min(player => player.DuelsInPass);
|
||||
candidates = candidates.Where(player => player.DuelsInPass == minDuels).ToList();
|
||||
return candidates[CBase.Game.GetRandom(candidates.Count)];
|
||||
}
|
||||
|
||||
private void _ValidateCurrentDuel()
|
||||
{
|
||||
var duel = CurrentDuel;
|
||||
if (duel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (var team = 0; team < TeamCount; team++)
|
||||
{
|
||||
if (duel.Players[team] == null || duel.Players[team].IsOut)
|
||||
{
|
||||
duel.Players[team] = _GetReplacement(team);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void _PrepareMedleyRound()
|
||||
{
|
||||
var songIds = new List<int>();
|
||||
for (var i = 0; i < GameData.NumMedleySongs; i++)
|
||||
{
|
||||
if (GameData.Songs.Count == 0)
|
||||
{
|
||||
_UpdateSongList();
|
||||
}
|
||||
|
||||
if (GameData.Songs.Count == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
songIds.Add(GameData.Songs[0]);
|
||||
GameData.Songs.RemoveAt(0);
|
||||
}
|
||||
|
||||
_PrepareRound(songIds.ToArray());
|
||||
}
|
||||
|
||||
private void _PrepareSongSelection()
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
_ScreenSongOptions.Selection.SelectNextRandomSong = true;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
|
||||
switch (GameData.SongSource)
|
||||
{
|
||||
case ESongSource.TR_SONGSOURCE_ALLSONGS:
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.FilterPlaylistId = -1;
|
||||
|
||||
_ScreenSongOptions.Selection.SongIndex = -1;
|
||||
_ScreenSongOptions.Selection.CategoryIndex = -1;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
|
||||
break;
|
||||
|
||||
case ESongSource.TR_SONGSOURCE_CATEGORY:
|
||||
_ScreenSongOptions.Sorting.SongSorting = GameData.Sorting;
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
||||
_ScreenSongOptions.Sorting.FilterPlaylistId = -1;
|
||||
|
||||
_ScreenSongOptions.Selection.CategoryIndex = GameData.CategoryIndex;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
|
||||
break;
|
||||
|
||||
case ESongSource.TR_SONGSOURCE_PLAYLIST:
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
||||
_ScreenSongOptions.Sorting.FilterPlaylistId = GameData.PlaylistId;
|
||||
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
|
||||
break;
|
||||
}
|
||||
|
||||
var duel = CurrentDuel;
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] { duel.Players[0].Jokers, duel.Players[1].Jokers };
|
||||
_ScreenSongOptions.Selection.TeamNames = new string[]
|
||||
{
|
||||
CBase.Profiles.GetPlayerName(duel.Players[0].ProfileId),
|
||||
CBase.Profiles.GetPlayerName(duel.Players[1].ProfileId)
|
||||
};
|
||||
}
|
||||
|
||||
private bool _PrepareRound(int[] songIds)
|
||||
{
|
||||
CBase.Game.Reset();
|
||||
CBase.Game.ClearSongs();
|
||||
|
||||
CBase.Game.SetNumPlayer(TeamCount);
|
||||
var players = CBase.Game.GetPlayers();
|
||||
var duel = CurrentDuel;
|
||||
if (players == null || players.Length < TeamCount || duel == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var team = 0; team < TeamCount; team++)
|
||||
{
|
||||
players[team].ProfileId = duel.Players[team].ProfileId;
|
||||
}
|
||||
|
||||
foreach (var songId in songIds)
|
||||
{
|
||||
var gameMode = GameData.GameMode;
|
||||
if (GameData.IsRematch && gameMode != EGameMode.TR_GAMEMODE_MEDLEY && CBase.Songs.GetSongById(songId).IsGameModeAvailable(EGameMode.TR_GAMEMODE_SHORTSONG))
|
||||
{
|
||||
gameMode = EGameMode.TR_GAMEMODE_SHORTSONG;
|
||||
}
|
||||
|
||||
CBase.Game.AddSong(songId, gameMode);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void _UpdateSongList()
|
||||
{
|
||||
if (GameData.Songs.Count > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (GameData.SongSource)
|
||||
{
|
||||
case ESongSource.TR_SONGSOURCE_PLAYLIST:
|
||||
for (var i = 0; i < CBase.Playlist.GetSongCount(GameData.PlaylistId); i++)
|
||||
{
|
||||
var id = CBase.Playlist.GetSong(GameData.PlaylistId, i).SongId;
|
||||
if (CBase.Songs.GetSongById(id).IsGameModeAvailable(EGameMode.TR_GAMEMODE_MEDLEY))
|
||||
{
|
||||
GameData.Songs.Add(id);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ESongSource.TR_SONGSOURCE_ALLSONGS:
|
||||
var avSongs = CBase.Songs.GetSongs();
|
||||
GameData.Songs.AddRange(avSongs.Where(song => song.IsGameModeAvailable(EGameMode.TR_GAMEMODE_MEDLEY)).Select(song => song.Id));
|
||||
break;
|
||||
|
||||
case ESongSource.TR_SONGSOURCE_CATEGORY:
|
||||
var oldSorting = CBase.Config.GetSongSorting();
|
||||
CBase.Songs.SortSongs(GameData.Sorting, EOffOn.TR_CONFIG_ON, CBase.Config.GetIgnoreArticles(), string.Empty, EDuetOptions.NoDuets, -1);
|
||||
|
||||
CBase.Songs.SetCategory(GameData.CategoryIndex);
|
||||
avSongs = CBase.Songs.GetVisibleSongs();
|
||||
GameData.Songs.AddRange(avSongs.Where(song => song.IsGameModeAvailable(EGameMode.TR_GAMEMODE_MEDLEY)).Select(song => song.Id));
|
||||
|
||||
CBase.Songs.SetCategory(-1);
|
||||
CBase.Songs.SortSongs(oldSorting, CBase.Config.GetTabs(), CBase.Config.GetIgnoreArticles(), string.Empty, EDuetOptions.NoDuets, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
GameData.Songs.Shuffle();
|
||||
}
|
||||
|
||||
private void _UpdateScores()
|
||||
{
|
||||
var duel = CurrentDuel;
|
||||
if (duel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var points = CBase.Game.GetPoints();
|
||||
if (points == null || points.NumRounds == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var scores = new double[TeamCount];
|
||||
for (var round = 0; round < points.NumRounds; round++)
|
||||
{
|
||||
var res = points.GetPlayer(round, TeamCount);
|
||||
if (res == null || res.Length < TeamCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (var p = 0; p < TeamCount; p++)
|
||||
{
|
||||
scores[p] += res[p].Points;
|
||||
}
|
||||
}
|
||||
|
||||
for (var p = 0; p < TeamCount; p++)
|
||||
{
|
||||
duel.Scores[p] = (int)Math.Round(scores[p] / points.NumRounds);
|
||||
}
|
||||
|
||||
GameData.NumDuelsPlayed++;
|
||||
|
||||
if (duel.Scores[0] == duel.Scores[1])
|
||||
{
|
||||
GameData.IsRematch = true;
|
||||
return;
|
||||
}
|
||||
|
||||
GameData.IsRematch = false;
|
||||
duel.Loser = duel.Scores[0] < duel.Scores[1] ? 0 : 1;
|
||||
duel.Players[duel.Loser].Hearts--;
|
||||
foreach (var player in duel.Players)
|
||||
{
|
||||
player.DuelsInPass++;
|
||||
}
|
||||
|
||||
GameData.LastDecidedDuel = duel;
|
||||
|
||||
for (var team = 0; team < TeamCount; team++)
|
||||
{
|
||||
if (GetTeam(team).All(player => player.IsOut))
|
||||
{
|
||||
GameData.WinnerTeam = 1 - team;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
GameData.DuelIndex++;
|
||||
if (GameData.DuelIndex >= GameData.PassDuels.Count)
|
||||
{
|
||||
_StartPass();
|
||||
}
|
||||
|
||||
_ValidateCurrentDuel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TeamSurvival
|
||||
{
|
||||
public class CPartyScreenTeamSurvivalConfig : CPartyScreenTeamSurvival
|
||||
{
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
private const string _SelectSlideHeartsMode = "SelectSlideHeartsMode";
|
||||
private const string _SelectSlideNumHearts = "SelectSlideNumHearts";
|
||||
private const string _SelectSlideNumJokers = "SelectSlideNumJokers";
|
||||
private const string _ButtonNext = "ButtonNext";
|
||||
private const string _ButtonBack = "ButtonBack";
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
_ThemeSelectSlides = new string[] { _SelectSlideHeartsMode, _SelectSlideNumHearts, _SelectSlideNumJokers };
|
||||
_ThemeButtons = new string[] { _ButtonNext, _ButtonBack };
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
{
|
||||
base.HandleInput(keyEvent);
|
||||
|
||||
if (!keyEvent.KeyPressed)
|
||||
{
|
||||
switch (keyEvent.Key)
|
||||
{
|
||||
case Keys.Back:
|
||||
case Keys.Escape:
|
||||
_PartyMode.Back();
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
_UpdateSlides();
|
||||
|
||||
if (_Buttons[_ButtonBack].Selected)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonNext].Selected)
|
||||
{
|
||||
_PartyMode.Next();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
case Keys.Right:
|
||||
_UpdateSlides();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandleMouse(SMouseEvent mouseEvent)
|
||||
{
|
||||
base.HandleMouse(mouseEvent);
|
||||
|
||||
if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent))
|
||||
{
|
||||
_UpdateSlides();
|
||||
if (_Buttons[_ButtonBack].Selected)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonNext].Selected)
|
||||
{
|
||||
_PartyMode.Next();
|
||||
}
|
||||
}
|
||||
|
||||
if (mouseEvent.RB)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
_SelectSlides[_SelectSlideHeartsMode].Clear();
|
||||
_SelectSlides[_SelectSlideHeartsMode].AddValue(CBase.Language.Translate("TR_SCREENCONFIG_HEARTS_EQUAL", PartyModeId));
|
||||
_SelectSlides[_SelectSlideHeartsMode].AddValue(CBase.Language.Translate("TR_SCREENCONFIG_HEARTS_PERPLAYER", PartyModeId));
|
||||
_SelectSlides[_SelectSlideHeartsMode].Selection = _PartyMode.GameData.HeartsPerPlayer ? 1 : 0;
|
||||
|
||||
_SelectSlides[_SelectSlideNumHearts].Clear();
|
||||
for (var i = 1; i <= CPartyModeTeamSurvival.MaxHearts; i++)
|
||||
{
|
||||
_SelectSlides[_SelectSlideNumHearts].AddValue(i.ToString());
|
||||
}
|
||||
|
||||
_SelectSlides[_SelectSlideNumHearts].SelectedValue = _PartyMode.GameData.NumHearts.ToString();
|
||||
|
||||
_SelectSlides[_SelectSlideNumJokers].Clear();
|
||||
for (var i = 0; i <= CPartyModeTeamSurvival.MaxJokers; i++)
|
||||
{
|
||||
_SelectSlides[_SelectSlideNumJokers].AddValue(i.ToString());
|
||||
}
|
||||
|
||||
_SelectSlides[_SelectSlideNumJokers].SelectedValue = _PartyMode.GameData.NumJokers.ToString();
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private void _UpdateSlides()
|
||||
{
|
||||
_PartyMode.GameData.HeartsPerPlayer = _SelectSlides[_SelectSlideHeartsMode].Selection == 1;
|
||||
_PartyMode.GameData.NumHearts = _SelectSlides[_SelectSlideNumHearts].Selection + 1;
|
||||
_PartyMode.GameData.NumJokers = _SelectSlides[_SelectSlideNumJokers].Selection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,374 @@
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TeamSurvival
|
||||
{
|
||||
class CHeartsRow
|
||||
{
|
||||
public Guid ProfileId;
|
||||
public CStatic Highlight;
|
||||
public CStatic Avatar;
|
||||
public CText Name;
|
||||
public CStatic[] Hearts;
|
||||
}
|
||||
|
||||
public class CPartyScreenTeamSurvivalHearts : CPartyScreenTeamSurvival
|
||||
{
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
private const string _ButtonNext = "ButtonNext";
|
||||
private const string _ButtonBack = "ButtonBack";
|
||||
|
||||
private const string _StaticRowHighlight = "StaticRowHighlight";
|
||||
private const string _StaticRowAvatar = "StaticRowAvatar";
|
||||
private const string _StaticHeart = "StaticHeart";
|
||||
private const string _TextRowName = "TextRowName";
|
||||
|
||||
private const float _FirstRowY = 260f;
|
||||
private const float _RowH = 70f;
|
||||
private const float _HeartSize = 46f;
|
||||
private const float _HeartSpace = 10f;
|
||||
private const float _LostHeartAlpha = 0.2f;
|
||||
|
||||
private readonly float[] _ColumnX = new float[] { 160f, 1020f };
|
||||
|
||||
private List<CHeartsRow> _Rows;
|
||||
private int _NumRowsUsed;
|
||||
private int _SelectedRow;
|
||||
private bool _OnButtons;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
_ThemeButtons = new string[] { _ButtonNext, _ButtonBack };
|
||||
_ThemeStatics = new string[] { _StaticRowHighlight, _StaticRowAvatar, _StaticHeart };
|
||||
_ThemeTexts = new string[] { _TextRowName };
|
||||
}
|
||||
|
||||
public override void LoadTheme(string xmlPath)
|
||||
{
|
||||
base.LoadTheme(xmlPath);
|
||||
|
||||
_Rows = new List<CHeartsRow>();
|
||||
for (var i = 0; i < CPartyModeTeamSurvival.TeamCount * CPartyModeTeamSurvival.MaxPlayersInTeam; i++)
|
||||
{
|
||||
var row = new CHeartsRow
|
||||
{
|
||||
Highlight = GetNewStatic(_Statics[_StaticRowHighlight]),
|
||||
Avatar = GetNewStatic(_Statics[_StaticRowAvatar]),
|
||||
Name = GetNewText(_Texts[_TextRowName]),
|
||||
Hearts = new CStatic[CPartyModeTeamSurvival.MaxHearts]
|
||||
};
|
||||
row.Avatar.Aspect = EAspect.Crop;
|
||||
_AddStatic(row.Highlight);
|
||||
_AddStatic(row.Avatar);
|
||||
_AddText(row.Name);
|
||||
for (var h = 0; h < CPartyModeTeamSurvival.MaxHearts; h++)
|
||||
{
|
||||
row.Hearts[h] = GetNewStatic(_Statics[_StaticHeart]);
|
||||
_AddStatic(row.Hearts[h]);
|
||||
}
|
||||
|
||||
_Rows.Add(row);
|
||||
}
|
||||
|
||||
_Statics[_StaticRowHighlight].Visible = false;
|
||||
_Statics[_StaticRowAvatar].Visible = false;
|
||||
_Statics[_StaticHeart].Visible = false;
|
||||
_Texts[_TextRowName].Visible = false;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
_NumRowsUsed = 0;
|
||||
var teams = new List<Guid>[] { _PartyMode.GameData.ProfileIdsTeam1, _PartyMode.GameData.ProfileIdsTeam2 };
|
||||
for (var team = 0; team < teams.Length; team++)
|
||||
{
|
||||
for (var i = 0; i < teams[team].Count && i < CPartyModeTeamSurvival.MaxPlayersInTeam; i++)
|
||||
{
|
||||
var row = _Rows[_NumRowsUsed++];
|
||||
row.ProfileId = teams[team][i];
|
||||
_PlaceRow(row, _ColumnX[team], _FirstRowY + i * _RowH);
|
||||
row.Avatar.Texture = CBase.Profiles.GetAvatar(row.ProfileId);
|
||||
row.Name.Text = CBase.Profiles.GetPlayerName(row.ProfileId);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < _Rows.Count; i++)
|
||||
{
|
||||
var visible = i < _NumRowsUsed;
|
||||
_Rows[i].Avatar.Visible = visible;
|
||||
_Rows[i].Name.Visible = visible;
|
||||
foreach (var heart in _Rows[i].Hearts)
|
||||
{
|
||||
heart.Visible = visible;
|
||||
}
|
||||
}
|
||||
|
||||
_SelectedRow = 0;
|
||||
_UpdateRows();
|
||||
_FocusRows();
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
{
|
||||
if (keyEvent.KeyPressed)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (keyEvent.Key)
|
||||
{
|
||||
case Keys.Back:
|
||||
case Keys.Escape:
|
||||
_PartyMode.Back();
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
if (_OnButtons && _Buttons[_ButtonBack].Selected)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
else
|
||||
{
|
||||
_PartyMode.Next();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
if (_OnButtons)
|
||||
{
|
||||
_FocusRows();
|
||||
}
|
||||
else
|
||||
{
|
||||
_SelectRow(_SelectedRow - 1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
if (_OnButtons)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (_SelectedRow + 1 < _NumRowsUsed)
|
||||
{
|
||||
_SelectRow(_SelectedRow + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
_FocusButtons();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
case Keys.Right:
|
||||
if (_OnButtons)
|
||||
{
|
||||
_SwitchButton();
|
||||
}
|
||||
else
|
||||
{
|
||||
_ChangeHearts(_SelectedRow, _GetHearts(_SelectedRow) + (keyEvent.Key == Keys.Left ? -1 : 1));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Keys.Tab:
|
||||
if (_OnButtons)
|
||||
{
|
||||
_SwitchButton();
|
||||
}
|
||||
else
|
||||
{
|
||||
_FocusButtons();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandleMouse(SMouseEvent mouseEvent)
|
||||
{
|
||||
base.HandleMouse(mouseEvent);
|
||||
if (_Buttons[_ButtonBack].Selected || _Buttons[_ButtonNext].Selected)
|
||||
{
|
||||
_OnButtons = true;
|
||||
}
|
||||
|
||||
if (mouseEvent.LB)
|
||||
{
|
||||
for (var r = 0; r < _NumRowsUsed; r++)
|
||||
{
|
||||
for (var h = 0; h < CPartyModeTeamSurvival.MaxHearts; h++)
|
||||
{
|
||||
if (CHelper.IsInBounds(_Rows[r].Hearts[h].Rect, mouseEvent))
|
||||
{
|
||||
_SelectRow(r);
|
||||
_ChangeHearts(r, h + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (CHelper.IsInBounds(_Rows[r].Highlight.Rect, mouseEvent))
|
||||
{
|
||||
_SelectRow(r);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_IsMouseOverCurSelection(mouseEvent))
|
||||
{
|
||||
if (_Buttons[_ButtonBack].Selected)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonNext].Selected)
|
||||
{
|
||||
_PartyMode.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mouseEvent.RB)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void _PlaceRow(CHeartsRow row, float x, float y)
|
||||
{
|
||||
var highlight = _Statics[_StaticRowHighlight].Rect;
|
||||
row.Highlight.MaxRect = new SRectF(x, y, highlight.W, highlight.H, highlight.Z);
|
||||
|
||||
var avatar = _Statics[_StaticRowAvatar].Rect;
|
||||
row.Avatar.MaxRect = new SRectF(x + 8f, y + (highlight.H - avatar.H) / 2, avatar.W, avatar.H, avatar.Z);
|
||||
|
||||
row.Name.X = x + avatar.W + 24f;
|
||||
row.Name.Y = y + (highlight.H - row.Name.H) / 2;
|
||||
|
||||
var heartsX = x + highlight.W - CPartyModeTeamSurvival.MaxHearts * (_HeartSize + _HeartSpace);
|
||||
for (var h = 0; h < row.Hearts.Length; h++)
|
||||
{
|
||||
row.Hearts[h].MaxRect = new SRectF(heartsX + h * (_HeartSize + _HeartSpace), y + (highlight.H - _HeartSize) / 2, _HeartSize, _HeartSize,
|
||||
_Statics[_StaticHeart].Rect.Z);
|
||||
}
|
||||
}
|
||||
|
||||
private int _GetHearts(int row)
|
||||
{
|
||||
if (row < 0 || row >= _NumRowsUsed)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return _PartyMode.GetStartHearts(_Rows[row].ProfileId);
|
||||
}
|
||||
|
||||
private void _ChangeHearts(int row, int hearts)
|
||||
{
|
||||
if (row < 0 || row >= _NumRowsUsed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
hearts = Math.Max(1, Math.Min(CPartyModeTeamSurvival.MaxHearts, hearts));
|
||||
_PartyMode.GameData.PlayerHearts[_Rows[row].ProfileId] = hearts;
|
||||
_UpdateRows();
|
||||
}
|
||||
|
||||
private void _FocusRows()
|
||||
{
|
||||
_OnButtons = false;
|
||||
_Buttons[_ButtonBack].Selected = false;
|
||||
_Buttons[_ButtonNext].Selected = false;
|
||||
_UpdateRows();
|
||||
}
|
||||
|
||||
private void _FocusButtons()
|
||||
{
|
||||
_OnButtons = true;
|
||||
_SelectElement(_Buttons[_ButtonNext]);
|
||||
_UpdateRows();
|
||||
}
|
||||
|
||||
private void _SwitchButton()
|
||||
{
|
||||
_SelectElement(_Buttons[_ButtonNext].Selected ? _Buttons[_ButtonBack] : _Buttons[_ButtonNext]);
|
||||
}
|
||||
|
||||
private void _SelectRow(int row)
|
||||
{
|
||||
_OnButtons = false;
|
||||
_Buttons[_ButtonBack].Selected = false;
|
||||
_Buttons[_ButtonNext].Selected = false;
|
||||
if (_NumRowsUsed == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_SelectedRow = Math.Max(0, Math.Min(_NumRowsUsed - 1, row));
|
||||
_UpdateRows();
|
||||
}
|
||||
|
||||
private void _UpdateRows()
|
||||
{
|
||||
for (var r = 0; r < _NumRowsUsed; r++)
|
||||
{
|
||||
var row = _Rows[r];
|
||||
row.Highlight.Visible = r == _SelectedRow && !_OnButtons;
|
||||
|
||||
var hearts = _GetHearts(r);
|
||||
var color = _Statics[_StaticHeart].Color;
|
||||
for (var h = 0; h < row.Hearts.Length; h++)
|
||||
{
|
||||
row.Hearts[h].Color = new SColorF(color.R, color.G, color.B, h < hearts ? color.A : color.A * _LostHeartAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
for (var r = _NumRowsUsed; r < _Rows.Count; r++)
|
||||
{
|
||||
_Rows[r].Highlight.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,560 @@
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TeamSurvival
|
||||
{
|
||||
class CPlayerCard
|
||||
{
|
||||
public CSurvivalPlayer Player;
|
||||
public CStatic Active;
|
||||
public CStatic Box;
|
||||
public CStatic Avatar;
|
||||
public CText Name;
|
||||
public CStatic[] Hearts;
|
||||
public SRectF[] HeartRects;
|
||||
}
|
||||
|
||||
public class CPartyScreenTeamSurvivalMain : CPartyScreenTeamSurvival
|
||||
{
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
private const string _TextPopupReallyExit = "TextPopupReallyExit";
|
||||
private const string _TextTeam1 = "TextTeam1";
|
||||
private const string _TextTeam2 = "TextTeam2";
|
||||
private const string _TextPass = "TextPass";
|
||||
private const string _TextCardName = "TextCardName";
|
||||
private const string _TextDuelName1 = "TextDuelName1";
|
||||
private const string _TextDuelName2 = "TextDuelName2";
|
||||
private const string _TextVersus = "TextVersus";
|
||||
private const string _TextRematch = "TextRematch";
|
||||
private const string _TextChampionLabel = "TextChampionLabel";
|
||||
private const string _TextChampion = "TextChampion";
|
||||
|
||||
private const string _ButtonNextRound = "ButtonNextRound";
|
||||
private const string _ButtonBack = "ButtonBack";
|
||||
private const string _ButtonExit = "ButtonExit";
|
||||
private const string _ButtonPopupYes = "ButtonPopupYes";
|
||||
private const string _ButtonPopupNo = "ButtonPopupNo";
|
||||
|
||||
private const string _StaticPopupBG = "StaticPopupBG";
|
||||
private const string _StaticCardBox = "StaticCardBox";
|
||||
private const string _StaticCardActive = "StaticCardActive";
|
||||
private const string _StaticCardAvatar = "StaticCardAvatar";
|
||||
private const string _StaticHeart = "StaticHeart";
|
||||
private const string _StaticDuelFrame1 = "StaticDuelFrame1";
|
||||
private const string _StaticDuelFrame2 = "StaticDuelFrame2";
|
||||
private const string _StaticDuelAvatar1 = "StaticDuelAvatar1";
|
||||
private const string _StaticDuelAvatar2 = "StaticDuelAvatar2";
|
||||
|
||||
private const string _ParticleEffectChampion = "ParticleEffectChampion";
|
||||
|
||||
private const float _CardFirstY = 265f;
|
||||
private const float _CardStep = 76f;
|
||||
private const float _ActiveBorder = 4f;
|
||||
private const float _HeartSize = 32f;
|
||||
private const float _HeartSpace = 6f;
|
||||
private const float _LostHeartAlpha = 0.18f;
|
||||
private const float _OutAlpha = 0.35f;
|
||||
private const float _SurvivorSize = 110f;
|
||||
private const float _SurvivorY = 470f;
|
||||
private const float _SurvivorSpace = 16f;
|
||||
|
||||
private const float _HeartLossDelay = 400f;
|
||||
private const float _HeartLossDuration = 800f;
|
||||
private const float _ChampionPopDuration = 700f;
|
||||
|
||||
private readonly float[] _CardX = new float[] { 60f, 1340f };
|
||||
|
||||
private bool _ExitPopupVisible;
|
||||
private List<CPlayerCard> _Cards;
|
||||
private List<CStatic> _Survivors;
|
||||
private readonly Stopwatch _AnimTimer = new Stopwatch();
|
||||
private CPlayerCard _LosingCard;
|
||||
private int _LostHeart;
|
||||
private bool _LosingCardOut;
|
||||
private float _ChampionHeight;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
_ThemeTexts = new string[]
|
||||
{
|
||||
_TextPopupReallyExit, _TextTeam1, _TextTeam2, _TextPass, _TextCardName, _TextDuelName1, _TextDuelName2, _TextVersus, _TextRematch, _TextChampionLabel,
|
||||
_TextChampion
|
||||
};
|
||||
_ThemeButtons = new string[] { _ButtonNextRound, _ButtonBack, _ButtonExit, _ButtonPopupYes, _ButtonPopupNo };
|
||||
_ThemeStatics = new string[]
|
||||
{
|
||||
_StaticPopupBG, _StaticCardBox, _StaticCardActive, _StaticCardAvatar, _StaticHeart, _StaticDuelFrame1, _StaticDuelFrame2, _StaticDuelAvatar1,
|
||||
_StaticDuelAvatar2
|
||||
};
|
||||
_ThemeParticleEffects = new string[] { _ParticleEffectChampion };
|
||||
}
|
||||
|
||||
public override void LoadTheme(string xmlPath)
|
||||
{
|
||||
base.LoadTheme(xmlPath);
|
||||
|
||||
_Cards = new List<CPlayerCard>();
|
||||
for (var i = 0; i < CPartyModeTeamSurvival.TeamCount * CPartyModeTeamSurvival.MaxPlayersInTeam; i++)
|
||||
{
|
||||
var card = new CPlayerCard
|
||||
{
|
||||
Active = GetNewStatic(_Statics[_StaticCardActive]),
|
||||
Box = GetNewStatic(_Statics[_StaticCardBox]),
|
||||
Avatar = GetNewStatic(_Statics[_StaticCardAvatar]),
|
||||
Name = GetNewText(_Texts[_TextCardName]),
|
||||
Hearts = new CStatic[CPartyModeTeamSurvival.MaxHearts],
|
||||
HeartRects = new SRectF[CPartyModeTeamSurvival.MaxHearts]
|
||||
};
|
||||
card.Avatar.Aspect = EAspect.Crop;
|
||||
_AddStatic(card.Active);
|
||||
_AddStatic(card.Box);
|
||||
_AddStatic(card.Avatar);
|
||||
_AddText(card.Name);
|
||||
for (var h = 0; h < CPartyModeTeamSurvival.MaxHearts; h++)
|
||||
{
|
||||
card.Hearts[h] = GetNewStatic(_Statics[_StaticHeart]);
|
||||
_AddStatic(card.Hearts[h]);
|
||||
}
|
||||
|
||||
_Cards.Add(card);
|
||||
}
|
||||
|
||||
_Survivors = new List<CStatic>();
|
||||
for (var i = 0; i < CPartyModeTeamSurvival.MaxPlayersInTeam; i++)
|
||||
{
|
||||
var survivor = GetNewStatic(_Statics[_StaticCardAvatar]);
|
||||
survivor.Aspect = EAspect.Crop;
|
||||
_AddStatic(survivor);
|
||||
_Survivors.Add(survivor);
|
||||
}
|
||||
|
||||
_Statics[_StaticCardBox].Visible = false;
|
||||
_Statics[_StaticCardActive].Visible = false;
|
||||
_Statics[_StaticCardAvatar].Visible = false;
|
||||
_Statics[_StaticHeart].Visible = false;
|
||||
_Texts[_TextCardName].Visible = false;
|
||||
_Statics[_StaticDuelAvatar1].Aspect = EAspect.Crop;
|
||||
_Statics[_StaticDuelAvatar2].Aspect = EAspect.Crop;
|
||||
|
||||
_ChampionHeight = _Texts[_TextChampion].Font.Height;
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
{
|
||||
base.HandleInput(keyEvent);
|
||||
|
||||
if (!keyEvent.KeyPressed)
|
||||
{
|
||||
switch (keyEvent.Key)
|
||||
{
|
||||
case Keys.Back:
|
||||
case Keys.Escape:
|
||||
_OnBack();
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
_OnSelect();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandleMouse(SMouseEvent mouseEvent)
|
||||
{
|
||||
base.HandleMouse(mouseEvent);
|
||||
|
||||
if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent))
|
||||
{
|
||||
_OnSelect();
|
||||
}
|
||||
|
||||
if (mouseEvent.RB)
|
||||
{
|
||||
_OnBack();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
_BuildCards();
|
||||
_UpdateCards();
|
||||
_UpdateDuel();
|
||||
|
||||
_LosingCard = null;
|
||||
var decided = _PartyMode.GameData.LastDecidedDuel;
|
||||
_PartyMode.GameData.LastDecidedDuel = null;
|
||||
if (decided != null)
|
||||
{
|
||||
_LosingCard = _FindCard(decided.Players[decided.Loser]);
|
||||
_LostHeart = decided.Players[decided.Loser].Hearts;
|
||||
_LosingCardOut = decided.Players[decided.Loser].IsOut;
|
||||
}
|
||||
|
||||
_AnimTimer.Reset();
|
||||
_AnimTimer.Start();
|
||||
_UpdateHeartLoss();
|
||||
|
||||
var started = _PartyMode.GameData.NumDuelsPlayed > 0;
|
||||
_Buttons[_ButtonBack].Visible = !started;
|
||||
_Buttons[_ButtonExit].Visible = started;
|
||||
_Buttons[_ButtonNextRound].Visible = !_PartyMode.IsFinished;
|
||||
|
||||
_ShowPopup(false);
|
||||
|
||||
if (_PartyMode.IsFinished)
|
||||
{
|
||||
_SelectElement(_Buttons[_ButtonExit]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_SelectElement(_Buttons[_ButtonNextRound]);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
_UpdateHeartLoss();
|
||||
|
||||
if (_PartyMode.IsFinished)
|
||||
{
|
||||
_UpdateChampion();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void _OnBack()
|
||||
{
|
||||
if (_ExitPopupVisible)
|
||||
{
|
||||
_ShowPopup(false);
|
||||
}
|
||||
else if (_PartyMode.GameData.NumDuelsPlayed == 0)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
else if (_PartyMode.IsFinished)
|
||||
{
|
||||
_EndParty();
|
||||
}
|
||||
else
|
||||
{
|
||||
_ShowPopup(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void _OnSelect()
|
||||
{
|
||||
if (_ExitPopupVisible)
|
||||
{
|
||||
if (_Buttons[_ButtonPopupYes].Selected)
|
||||
{
|
||||
_EndParty();
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonPopupNo].Selected)
|
||||
{
|
||||
_ShowPopup(false);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonNextRound].Selected && _Buttons[_ButtonNextRound].Visible)
|
||||
{
|
||||
_PartyMode.Next();
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonBack].Selected && _Buttons[_ButtonBack].Visible)
|
||||
{
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
if (_Buttons[_ButtonExit].Selected && _Buttons[_ButtonExit].Visible)
|
||||
{
|
||||
if (_PartyMode.IsFinished)
|
||||
{
|
||||
_EndParty();
|
||||
}
|
||||
else
|
||||
{
|
||||
_ShowPopup(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void _EndParty()
|
||||
{
|
||||
CBase.Graphics.FadeTo(EScreen.Party);
|
||||
}
|
||||
|
||||
private void _ShowPopup(bool visible)
|
||||
{
|
||||
_ExitPopupVisible = visible;
|
||||
|
||||
_Statics[_StaticPopupBG].Visible = _ExitPopupVisible;
|
||||
_Texts[_TextPopupReallyExit].Visible = _ExitPopupVisible;
|
||||
_Buttons[_ButtonPopupYes].Visible = _ExitPopupVisible;
|
||||
_Buttons[_ButtonPopupNo].Visible = _ExitPopupVisible;
|
||||
|
||||
if (_ExitPopupVisible)
|
||||
{
|
||||
_SelectElement(_Buttons[_ButtonPopupNo]);
|
||||
}
|
||||
}
|
||||
|
||||
private static float _EaseOutBack(float t)
|
||||
{
|
||||
const float c1 = 1.70158f;
|
||||
const float c3 = c1 + 1f;
|
||||
return 1f + c3 * (float)Math.Pow(t - 1f, 3) + c1 * (float)Math.Pow(t - 1f, 2);
|
||||
}
|
||||
|
||||
private static SColorF _WithAlpha(SColorF color, float alpha)
|
||||
{
|
||||
return new SColorF(color.R, color.G, color.B, color.A * alpha);
|
||||
}
|
||||
|
||||
private string _GetTeamName(int team)
|
||||
{
|
||||
return CBase.Language.Translate("TR_TEAM", PartyModeId) + " " + (team + 1);
|
||||
}
|
||||
|
||||
private CPlayerCard _FindCard(CSurvivalPlayer player)
|
||||
{
|
||||
foreach (var card in _Cards)
|
||||
{
|
||||
if (card.Player == player)
|
||||
{
|
||||
return card;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void _BuildCards()
|
||||
{
|
||||
var cardNr = 0;
|
||||
for (var team = 0; team < CPartyModeTeamSurvival.TeamCount; team++)
|
||||
{
|
||||
var players = _PartyMode.GetTeam(team);
|
||||
for (var i = 0; i < players.Count && cardNr < _Cards.Count; i++)
|
||||
{
|
||||
var card = _Cards[cardNr++];
|
||||
card.Player = players[i];
|
||||
|
||||
var boxTemplate = _Statics[_StaticCardBox].Rect;
|
||||
var box = new SRectF(_CardX[team], _CardFirstY + i * _CardStep, boxTemplate.W, boxTemplate.H, boxTemplate.Z);
|
||||
card.Box.MaxRect = box;
|
||||
card.Active.MaxRect = new SRectF(box.X - _ActiveBorder, box.Y - _ActiveBorder, box.W + 2 * _ActiveBorder, box.H + 2 * _ActiveBorder,
|
||||
_Statics[_StaticCardActive].Rect.Z);
|
||||
|
||||
var avatarTemplate = _Statics[_StaticCardAvatar].Rect;
|
||||
card.Avatar.MaxRect = new SRectF(box.X + 6f, box.Y + (box.H - avatarTemplate.H) / 2, avatarTemplate.W, avatarTemplate.H, avatarTemplate.Z);
|
||||
card.Avatar.Texture = CBase.Profiles.GetAvatar(card.Player.ProfileId);
|
||||
|
||||
card.Name.Text = CBase.Profiles.GetPlayerName(card.Player.ProfileId);
|
||||
card.Name.X = box.X + avatarTemplate.W + 18f;
|
||||
card.Name.Y = box.Y + (box.H - card.Name.H) / 2;
|
||||
card.Name.W = box.W - avatarTemplate.W - 30f - CPartyModeTeamSurvival.MaxHearts * (_HeartSize + _HeartSpace);
|
||||
|
||||
var heartsX = box.X + box.W - 10f - card.Player.StartHearts * (_HeartSize + _HeartSpace);
|
||||
for (var h = 0; h < card.Hearts.Length; h++)
|
||||
{
|
||||
card.HeartRects[h] = new SRectF(heartsX + h * (_HeartSize + _HeartSpace), box.Y + (box.H - _HeartSize) / 2, _HeartSize, _HeartSize,
|
||||
_Statics[_StaticHeart].Rect.Z);
|
||||
card.Hearts[h].MaxRect = card.HeartRects[h];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = cardNr; i < _Cards.Count; i++)
|
||||
{
|
||||
_Cards[i].Player = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void _UpdateCards()
|
||||
{
|
||||
var duel = _PartyMode.CurrentDuel;
|
||||
foreach (var card in _Cards)
|
||||
{
|
||||
var visible = card.Player != null;
|
||||
card.Box.Visible = visible;
|
||||
card.Avatar.Visible = visible;
|
||||
card.Name.Visible = visible;
|
||||
card.Active.Visible = visible && duel != null && (duel.Players[0] == card.Player || duel.Players[1] == card.Player);
|
||||
for (var h = 0; h < card.Hearts.Length; h++)
|
||||
{
|
||||
card.Hearts[h].Visible = visible && h < card.Player.StartHearts;
|
||||
}
|
||||
|
||||
if (visible)
|
||||
{
|
||||
_SetCardAlpha(card, card.Player.IsOut ? _OutAlpha : 1f);
|
||||
_SetHeartAlphas(card, card.Player.Hearts);
|
||||
}
|
||||
}
|
||||
|
||||
for (var team = 0; team < CPartyModeTeamSurvival.TeamCount; team++)
|
||||
{
|
||||
var text = _Texts[team == 0 ? _TextTeam1 : _TextTeam2];
|
||||
text.Text = _GetTeamName(team);
|
||||
text.Color = CBase.Themes.GetPlayerColor(team + 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void _SetCardAlpha(CPlayerCard card, float alpha)
|
||||
{
|
||||
card.Box.Color = _WithAlpha(_Statics[_StaticCardBox].Color, alpha);
|
||||
card.Avatar.Color = _WithAlpha(_Statics[_StaticCardAvatar].Color, alpha);
|
||||
card.Name.Color = _WithAlpha(_Texts[_TextCardName].Color, alpha);
|
||||
}
|
||||
|
||||
private void _SetHeartAlphas(CPlayerCard card, int hearts)
|
||||
{
|
||||
for (var h = 0; h < card.Hearts.Length; h++)
|
||||
{
|
||||
card.Hearts[h].MaxRect = card.HeartRects[h];
|
||||
card.Hearts[h].Color = _WithAlpha(_Statics[_StaticHeart].Color, h < hearts ? 1f : _LostHeartAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
private void _UpdateHeartLoss()
|
||||
{
|
||||
if (_LosingCard == null || _LostHeart < 0 || _LostHeart >= _LosingCard.Hearts.Length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var progress = Math.Max(0f, Math.Min(1f, (_AnimTimer.ElapsedMilliseconds - _HeartLossDelay) / _HeartLossDuration));
|
||||
var heart = _LosingCard.Hearts[_LostHeart];
|
||||
var rect = _LosingCard.HeartRects[_LostHeart];
|
||||
var scale = 1f + progress;
|
||||
var size = rect.W * scale;
|
||||
heart.MaxRect = new SRectF(rect.X + (rect.W - size) / 2, rect.Y + (rect.H - size) / 2, size, size, rect.Z);
|
||||
heart.Color = _WithAlpha(_Statics[_StaticHeart].Color, 1f - (1f - _LostHeartAlpha) * progress);
|
||||
|
||||
if (_LosingCardOut)
|
||||
{
|
||||
_SetCardAlpha(_LosingCard, 1f - (1f - _OutAlpha) * progress);
|
||||
}
|
||||
|
||||
if (progress >= 1f)
|
||||
{
|
||||
heart.MaxRect = rect;
|
||||
_LosingCard = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void _UpdateDuel()
|
||||
{
|
||||
var finished = _PartyMode.IsFinished;
|
||||
var duel = _PartyMode.CurrentDuel;
|
||||
var showDuel = !finished && duel != null;
|
||||
|
||||
_Statics[_StaticDuelFrame1].Visible = showDuel;
|
||||
_Statics[_StaticDuelFrame2].Visible = showDuel;
|
||||
_Statics[_StaticDuelAvatar1].Visible = showDuel;
|
||||
_Statics[_StaticDuelAvatar2].Visible = showDuel;
|
||||
_Texts[_TextDuelName1].Visible = showDuel;
|
||||
_Texts[_TextDuelName2].Visible = showDuel;
|
||||
_Texts[_TextVersus].Visible = showDuel;
|
||||
_Texts[_TextPass].Visible = showDuel;
|
||||
_Texts[_TextRematch].Visible = showDuel && _PartyMode.GameData.IsRematch;
|
||||
|
||||
if (showDuel)
|
||||
{
|
||||
_Statics[_StaticDuelFrame1].Color = CBase.Themes.GetPlayerColor(1);
|
||||
_Statics[_StaticDuelFrame2].Color = CBase.Themes.GetPlayerColor(2);
|
||||
_Statics[_StaticDuelAvatar1].Texture = CBase.Profiles.GetAvatar(duel.Players[0].ProfileId);
|
||||
_Statics[_StaticDuelAvatar2].Texture = CBase.Profiles.GetAvatar(duel.Players[1].ProfileId);
|
||||
_Texts[_TextDuelName1].Text = CBase.Profiles.GetPlayerName(duel.Players[0].ProfileId);
|
||||
_Texts[_TextDuelName2].Text = CBase.Profiles.GetPlayerName(duel.Players[1].ProfileId);
|
||||
_Texts[_TextPass].Text = CBase.Language.Translate("TR_SCREENMAIN_PASS", PartyModeId) + " " + _PartyMode.GameData.PassNr + " · " +
|
||||
CBase.Language.Translate("TR_SCREENMAIN_DUEL", PartyModeId) + " " + (_PartyMode.GameData.DuelIndex + 1) + " / " +
|
||||
_PartyMode.GameData.PassDuels.Count;
|
||||
}
|
||||
|
||||
_Texts[_TextChampionLabel].Visible = finished;
|
||||
_Texts[_TextChampion].Visible = finished;
|
||||
_ParticleEffects[_ParticleEffectChampion].Visible = finished;
|
||||
|
||||
var survivors = new List<CSurvivalPlayer>();
|
||||
if (finished)
|
||||
{
|
||||
_Texts[_TextChampion].Text = _GetTeamName(_PartyMode.GameData.WinnerTeam);
|
||||
foreach (var player in _PartyMode.GetTeam(_PartyMode.GameData.WinnerTeam))
|
||||
{
|
||||
if (!player.IsOut)
|
||||
{
|
||||
survivors.Add(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var x = (CBase.Settings.GetRenderW() - survivors.Count * _SurvivorSize - (survivors.Count - 1) * _SurvivorSpace) / 2;
|
||||
for (var i = 0; i < _Survivors.Count; i++)
|
||||
{
|
||||
_Survivors[i].Visible = i < survivors.Count;
|
||||
if (i >= survivors.Count)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
_Survivors[i].Texture = CBase.Profiles.GetAvatar(survivors[i].ProfileId);
|
||||
_Survivors[i].MaxRect = new SRectF(x, _SurvivorY, _SurvivorSize, _SurvivorSize, _Statics[_StaticCardAvatar].Rect.Z);
|
||||
x += _SurvivorSize + _SurvivorSpace;
|
||||
}
|
||||
}
|
||||
|
||||
private void _UpdateChampion()
|
||||
{
|
||||
var time = _AnimTimer.ElapsedMilliseconds;
|
||||
float scale;
|
||||
if (time < _ChampionPopDuration)
|
||||
{
|
||||
scale = 0.3f + 0.7f * _EaseOutBack(time / _ChampionPopDuration);
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = 1f + 0.03f * (float)Math.Sin((time - _ChampionPopDuration) / 1000.0 * Math.PI * 1.4);
|
||||
}
|
||||
|
||||
_Texts[_TextChampion].Font.Height = _ChampionHeight * scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TeamSurvival
|
||||
{
|
||||
public class CPartyScreenTeamSurvivalNames : CMenuPartyNameSelection
|
||||
{
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
private new CPartyModeTeamSurvival _PartyMode;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
_PartyMode = (CPartyModeTeamSurvival)base._PartyMode;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
while (_PartyMode.GameData.ProfileIdsTeam1.Count > _PartyMode.GameData.NumPlayerTeam1)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIdsTeam1.RemoveAt(_PartyMode.GameData.ProfileIdsTeam1.Count - 1);
|
||||
}
|
||||
|
||||
while (_PartyMode.GameData.ProfileIdsTeam2.Count > _PartyMode.GameData.NumPlayerTeam2)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIdsTeam2.RemoveAt(_PartyMode.GameData.ProfileIdsTeam2.Count - 1);
|
||||
}
|
||||
|
||||
SetPartyModeData(CPartyModeTeamSurvival.TeamCount, _PartyMode.GameData.NumPlayerTeam1 + _PartyMode.GameData.NumPlayerTeam2,
|
||||
new int[] { _PartyMode.GameData.NumPlayerTeam1, _PartyMode.GameData.NumPlayerTeam2 });
|
||||
var ids = new List<Guid>[] { _PartyMode.GameData.ProfileIdsTeam1, _PartyMode.GameData.ProfileIdsTeam2 };
|
||||
SetPartyModeProfiles(ids);
|
||||
}
|
||||
|
||||
public override void Back()
|
||||
{
|
||||
_SaveTeams();
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
public override void Next()
|
||||
{
|
||||
_SaveTeams();
|
||||
_PartyMode.GameData.NumPlayerTeam1 = _PartyMode.GameData.ProfileIdsTeam1.Count;
|
||||
_PartyMode.GameData.NumPlayerTeam2 = _PartyMode.GameData.ProfileIdsTeam2.Count;
|
||||
_PartyMode.Next();
|
||||
}
|
||||
|
||||
private void _SaveTeams()
|
||||
{
|
||||
if (_TeamList.Length == CPartyModeTeamSurvival.TeamCount)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIdsTeam1 = _TeamList[0];
|
||||
_PartyMode.GameData.ProfileIdsTeam2 = _TeamList[1];
|
||||
}
|
||||
|
||||
if (_NumPlayerTeams.Length == CPartyModeTeamSurvival.TeamCount)
|
||||
{
|
||||
_PartyMode.GameData.NumPlayerTeam1 = _NumPlayerTeams[0];
|
||||
_PartyMode.GameData.NumPlayerTeam2 = _NumPlayerTeams[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TeamSurvival
|
||||
{
|
||||
class CPartyScreenTeamSurvivalSongs : CMenuPartySongSelection
|
||||
{
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
private new CPartyModeTeamSurvival _PartyMode;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
_PartyMode = (CPartyModeTeamSurvival)base._PartyMode;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
Source = _PartyMode.GameData.SongSource;
|
||||
Sorting = _PartyMode.GameData.Sorting;
|
||||
Category = _PartyMode.GameData.CategoryIndex;
|
||||
Playlist = _PartyMode.GameData.PlaylistId;
|
||||
SongMode = _PartyMode.GameData.GameMode;
|
||||
NumMedleySongs = _PartyMode.GameData.NumMedleySongs;
|
||||
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
public override void Back()
|
||||
{
|
||||
_SaveConfig();
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
public override void Next()
|
||||
{
|
||||
_SaveConfig();
|
||||
_PartyMode.Next();
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void _SetAllowedOptions()
|
||||
{
|
||||
base._SetAllowedOptions();
|
||||
|
||||
AllowedSongModes = new EGameMode[] { EGameMode.TR_GAMEMODE_NORMAL, EGameMode.TR_GAMEMODE_SHORTSONG, EGameMode.TR_GAMEMODE_MEDLEY };
|
||||
}
|
||||
|
||||
private void _SaveConfig()
|
||||
{
|
||||
_PartyMode.GameData.SongSource = Source;
|
||||
_PartyMode.GameData.Sorting = Sorting;
|
||||
_PartyMode.GameData.CategoryIndex = Category;
|
||||
_PartyMode.GameData.PlaylistId = Playlist;
|
||||
_PartyMode.GameData.GameMode = SongMode;
|
||||
_PartyMode.GameData.NumMedleySongs = NumMedleySongs;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{7B2E4A19-5C3D-4E8F-A16B-2D9C0F3E8B41}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>VocaluxeLib.PartyModes.TeamSurvival</RootNamespace>
|
||||
<AssemblyName>TeamSurvival</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<DefineConstants>WIN</DefineConstants>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<DefineConstants>LINUX</DefineConstants>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
|
||||
<OutputPath>bin</OutputPath>
|
||||
<DefineConstants>WIN</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CPartyModeTeamSurvival.cs" />
|
||||
<Compile Include="CPartyScreenTeamSurvivalConfig.cs" />
|
||||
<Compile Include="CPartyScreenTeamSurvivalHearts.cs" />
|
||||
<Compile Include="CPartyScreenTeamSurvivalMain.cs" />
|
||||
<Compile Include="CPartyScreenTeamSurvivalNames.cs" />
|
||||
<Compile Include="CPartyScreenTeamSurvivalSongs.cs" />
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
|
||||
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
|
||||
<Name>VocaluxeLib</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
|
||||
cd $(SolutionDir)Partymodes\
|
||||
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
|
||||
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
|
||||
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
|
||||
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,809 @@
|
||||
<StyleCopSettings Version="105">
|
||||
<Analyzers>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
|
||||
<Rules>
|
||||
<Rule Name="ElementsMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PartialElementsMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="EnumerationItemsMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationMustContainValidXml">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustHaveSummary">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PartialElementDocumentationMustHaveSummary">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustHaveSummaryText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParametersMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParameterDocumentationMustHaveText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementReturnValueMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementReturnValueDocumentationMustHaveText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="VoidReturnValueMustNotBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParametersMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationTextMustNotBeEmpty">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationTextMustContainWhitespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationMustMeetCharacterPercentage">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="IncludedDocumentationXPathDoesNotExist">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileMustHaveHeader">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustShowCopyright">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustHaveCopyrightText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustContainFileName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustHaveValidCompanyText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
|
||||
<Rules>
|
||||
<Rule Name="FieldNamesMustNotBeginWithUnderscore">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementMustBeginWithUpperCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementMustBeginWithLowerCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="InterfaceNamesMustBeginWithI">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FieldNamesMustNotUseHungarianNotation">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="VariableNamesMustNotBePrefixed">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FieldNamesMustNotContainUnderscore">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
|
||||
<Rules>
|
||||
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="StatementMustNotBeOnSingleLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementMustNotBeOnSingleLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CurlyBracketsMustNotBeOmitted">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SingleLineCommentMustBePrecededByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementsMustBeSeparatedByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
|
||||
<Rules>
|
||||
<Rule Name="AccessModifierMustBeDeclared">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FieldsMustBePrivate">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeAnalysisSuppressionMustHaveJustification">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DebugAssertMustProvideMessageText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DebugFailMustProvideMessageText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileMayOnlyContainASingleClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileMayOnlyContainASingleNamespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="StatementMustNotUseUnnecessaryParenthesis">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ConditionalExpressionsMustDeclarePrecedence">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="RemoveDelegateParenthesisWhenPossible">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="AttributeConstructorMustNotUseUnnecessaryParenthesis">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="RemoveUnnecessaryCode">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
|
||||
<Rules>
|
||||
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementsMustAppearInTheCorrectOrder">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementsMustBeOrderedByAccess">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ConstantsMustAppearBeforeFields">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="StaticElementsMustAppearBeforeInstanceElements">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DeclarationKeywordsMustFollowOrder">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ProtectedMustComeBeforeInternal">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PropertyAccessorsMustFollowOrder">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="EventAccessorsMustFollowOrder">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
|
||||
<Rules>
|
||||
<Rule Name="CommentsMustContainText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PrefixLocalCallsWithThis">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PrefixCallsCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ParameterListMustFollowDeclaration">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ParameterMustFollowComma">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ParameterMustNotSpanMultipleLines">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="QueryClauseMustFollowPreviousClause">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DoNotPlaceRegionsWithinElements">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainEmptyStatements">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="BlockStatementsMustNotContainEmbeddedComments">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UseStringEmptyForEmptyStrings">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UseBuiltInTypeAlias">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UseShorthandForNullableTypes">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
|
||||
<Rules>
|
||||
<Rule Name="KeywordsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CommasMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SemicolonsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SymbolsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationLinesMustBeginWithSingleSpace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OperatorKeywordMustBeFollowedBySpace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="NegativeSignsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PositiveSignsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ColonsMustBeSpacedCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="TabsMustNotBeUsed">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
</Analyzers>
|
||||
</StyleCopSettings>
|
||||
Reference in new issue
Block a user