Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

149 team info module #252

Merged
merged 113 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
efd6b7c
initial
snixtho Jan 2, 2024
bb7d777
implement async deque
snixtho Jan 3, 2024
a41f9f6
implement queue controller
snixtho Jan 3, 2024
c25dbcf
Add container and panel ML components.
snixtho Jan 5, 2024
0c56550
add border to panel
snixtho Jan 5, 2024
b363a64
convert opacity based on 4-byte color
snixtho Jan 15, 2024
0df0e3b
add chip
snixtho Jan 16, 2024
e799aa5
separator
snixtho Jan 16, 2024
7d1d6e9
add placeholder for textinput
snixtho Jan 24, 2024
0ca5557
smol save
snixtho Jan 27, 2024
e6d67d7
adfg
snixtho Feb 7, 2024
7c6fde9
map list module project file
snixtho Feb 8, 2024
541607c
local save
snixtho Feb 9, 2024
0be57df
changes
snixtho Feb 16, 2024
22b665e
map row tweaks
snixtho Feb 29, 2024
ff584be
basic scrollbar
snixtho Mar 4, 2024
67c5bea
scrollbar can now control the scrolling element
snixtho Mar 5, 2024
2d4302e
fix relative drag position of scrollbar
snixtho Mar 5, 2024
d2735df
begin using map data objects
snixtho Mar 5, 2024
d6a8218
actually show the current map list
snixtho Mar 7, 2024
91ab4f0
save map details to db
snixtho Mar 12, 2024
5f99ddc
Optimize GetCurrentMapListAsync
snixtho Mar 14, 2024
82e6971
Add ability to queue maps from the maplist.
snixtho Mar 14, 2024
10a0cda
add widget prototype with new style
snixtho Apr 12, 2024
13ee3f2
starting new style
snixtho Apr 18, 2024
ec217ba
new button and dropdown
snixtho May 14, 2024
ad22b40
text input
snixtho May 15, 2024
03e85c8
huh
snixtho May 15, 2024
ec85050
alert
snixtho May 15, 2024
af259f7
updated checkbox
snixtho May 15, 2024
8d2cca8
update radiobutton
snixtho May 15, 2024
fe7bcec
some fixes and improvements
snixtho May 15, 2024
8425e08
switch
snixtho May 15, 2024
b40c669
update window
snixtho May 15, 2024
567ce95
fix tags
snixtho May 15, 2024
239e507
fix chip
snixtho May 17, 2024
4777533
fix rating
snixtho May 17, 2024
dcc2b69
fix link button
snixtho May 17, 2024
cd581b7
fix separator
snixtho May 17, 2024
ffef7ab
add utility colors to the ui demo
snixtho May 17, 2024
a07cf0d
add round buttons
snixtho May 17, 2024
1995103
separate namespace for containers
snixtho May 17, 2024
fff2743
add some breathing room for window icon
snixtho May 17, 2024
70e5d0a
make simple maplist ui
snixtho May 17, 2024
21116f7
add close button back to windows
snixtho May 18, 2024
163b634
documentation for components
snixtho May 18, 2024
5b07e4e
Update SetName templates to work with new default design
araszka May 22, 2024
5941881
Add TeamSettingsModule
araszka May 25, 2024
8c18b45
Add services and controllers for TeamSettings
araszka May 31, 2024
d447e67
Fix component default id
araszka Jun 8, 2024
09a6420
Fix fallthrough attributes for button component
araszka Jun 8, 2024
94ca907
Remove redundant dataId from window component
araszka Jun 8, 2024
380ad3f
Fix pass case sensitive attribute to rectangle component
araszka Jun 8, 2024
e2a9393
Update ManiaTemplates to 0.0.24-alpha and use raw expressions where n…
araszka Jun 8, 2024
7d8e2e0
Remove redundant scriptevents attribute
araszka Jun 8, 2024
65a0a78
Fix pass script events to rectangle and quarter circle component
araszka Jun 8, 2024
e4eb53c
Merge branch 'refs/heads/bugfix/fallthrough-attributes-causing-proble…
araszka Jun 9, 2024
115b8ac
Implement edit team settings via manialink
araszka Jun 22, 2024
98418ec
Parse club link URL instead of loading team infos from RPC to get cor…
araszka Jun 22, 2024
3b25a8c
Add constants for default team values
araszka Jun 22, 2024
84d9147
Prevent exception on empty club link URL
araszka Jun 22, 2024
8e1cf80
Add custom data annotations for team settings
araszka Jun 22, 2024
a96732e
Add ColorInput form element to team settings form
araszka Jun 22, 2024
3713feb
Add script for team settings color picker
araszka Jul 4, 2024
3e5fc61
Update color preview in team setting when using color picker
araszka Jul 4, 2024
217ff35
Use circle for color input preview
araszka Jul 6, 2024
cc34e03
Set color preview on entry submit
araszka Jul 6, 2024
7bc0b40
Add proper color code validation for team settings
araszka Jul 6, 2024
e46d9b1
Add doc comments to ITeamSettingsService
araszka Jul 6, 2024
266dcf7
Merge remote-tracking branch 'origin/master' into team-settings
araszka Jul 9, 2024
eceb915
Remove HideTeamSettingsForEveryoneAsync
araszka Jul 9, 2024
9b02f57
Add TeamSettingsModule.Tests project
araszka Jul 9, 2024
76fab57
Add test for generating and parsing club link URLs
araszka Jul 10, 2024
3ea1dba
Add test for set club link urls
araszka Jul 10, 2024
af4cb8c
Add test for TeamSettingsManialinkController
araszka Jul 10, 2024
d637504
Add test for updating team settings with invalid form data
araszka Jul 13, 2024
4e7ee67
Update module name
araszka Jul 13, 2024
26fc2aa
Add test for getting current team settings for the editor
araszka Jul 13, 2024
7786015
Create TeamInfo module
araszka Jul 14, 2024
da476f4
Add basic team info markup
araszka Jul 14, 2024
3e339aa
Add emblem and fallback for team info
araszka Jul 14, 2024
d89ffb9
Add match point and gained points boxes for team info
araszka Jul 15, 2024
b47f6bf
Update team info template
araszka Jul 15, 2024
9abfe90
Add detect map point and pass real team points to team info widget
araszka Jul 21, 2024
ca7fd5d
Improve showing/hiding team info on map change
araszka Jul 22, 2024
ae28251
Hide team info for connecting players during podium or map change
araszka Jul 22, 2024
5234d3f
Reduce code
araszka Jul 22, 2024
e62caa4
Reduce code
araszka Jul 22, 2024
57be8d3
Merge remote-tracking branch 'origin/master' into 149-team-info-module
araszka Jul 27, 2024
35a1e75
Add all known team mode settings to ModeScriptTeamSettings
araszka Jul 27, 2024
ffd49ce
Add team info config
araszka Jul 27, 2024
5e4459b
Add doc comments for ITeamInfoService
araszka Jul 27, 2024
c828917
Add team info service and controller tests
araszka Jul 27, 2024
6756958
Prevent showing team info widget if mode isn't teams.
araszka Jul 27, 2024
9a82cec
Remove duplicates from InertialModules and project sln
araszka Jul 27, 2024
493d0d5
Incorporate suggested sonarcloud improvements
araszka Jul 27, 2024
1999a5d
Add full team name for expanded mode in team info
araszka Jul 27, 2024
d8e599e
Hide emblem box if no emblem URL is available for team info
araszka Jul 27, 2024
143c072
Remove gaps in team info widget
araszka Jul 27, 2024
8fcc6bd
Add missing async method suffix
araszka Jul 27, 2024
013a8a5
Use fallback neutral emblem URL if available and show first letter of…
araszka Jul 27, 2024
2e54ce7
Use persistent manialinks instead of tracking visibility in module it…
araszka Jul 28, 2024
74f1efd
Merge remote-tracking branch 'origin/master' into 149-team-info-module
araszka Jul 30, 2024
fa04c4b
Remove unnecessary call of HideTeamInfoWidgetEveryoneAsync
araszka Jul 30, 2024
96525bf
Use text-primary instead of redundant arguments on some labels
araszka Jul 30, 2024
9fbf0e8
Use style classes for textsizes
araszka Jul 30, 2024
6c3e6e8
Use hex6 instead of hex3 in color input component
araszka Jul 30, 2024
579b849
Add missing ui style import and use existing style classes where poss…
araszka Jul 30, 2024
cf7c88c
Use existing TeamsModeScriptSettings model
araszka Jul 30, 2024
024b657
Merge branch 'master' into 149-team-info-module
araszka Jul 30, 2024
2b59d19
Merge branch 'master' into 149-team-info-module
araszka Aug 2, 2024
54d6453
Merge remote-tracking branch 'origin/master' into 149-team-info-module
araszka Aug 6, 2024
8bf3b18
Merge remote-tracking branch 'origin/149-team-info-module' into 149-t…
araszka Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions EvoSC.sln
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalRecordsModule.Tests",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForceTeamModule", "src/Modules/ForceTeamModule/ForceTeamModule.csproj", "{ACFF2B23-0518-493C-93A0-08CF9FD4F8E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForceTeamModule.Tests", "tests\Modules\ForceTeamModule.Tests\ForceTeamModule.Tests.csproj", "{DE9532E8-F0ED-400B-9592-AF8F74BC83EB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamSettingsModule", "src\Modules\TeamSettingsModule\TeamSettingsModule.csproj", "{C10A11E5-4AD8-4229-81F1-57D7DC364E27}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamSettingsModule.Tests", "tests\Modules\TeamSettingsModule.Tests\TeamSettingsModule.Tests.csproj", "{B1745099-0081-4443-BF79-26A888765E16}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForceTeamModule.Tests", "tests\Modules\ForceTeamModule.Tests\ForceTeamModule.Tests.csproj", "{DE9532E8-F0ED-400B-9592-AF8F74BC83EB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamInfoModule", "src\Modules\TeamInfoModule\TeamInfoModule.csproj", "{5E178B0D-5F29-4990-8DCF-DC7FF113C4F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamInfoModule.Tests", "tests\Modules\TeamInfoModule.Tests\TeamInfoModule.Tests.csproj", "{71D8BDA5-6787-471A-8064-CEEE4203EBEF}"
EndProject


Expand Down Expand Up @@ -366,6 +370,14 @@ Global
{DE9532E8-F0ED-400B-9592-AF8F74BC83EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE9532E8-F0ED-400B-9592-AF8F74BC83EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE9532E8-F0ED-400B-9592-AF8F74BC83EB}.Release|Any CPU.Build.0 = Release|Any CPU
{5E178B0D-5F29-4990-8DCF-DC7FF113C4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E178B0D-5F29-4990-8DCF-DC7FF113C4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E178B0D-5F29-4990-8DCF-DC7FF113C4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E178B0D-5F29-4990-8DCF-DC7FF113C4F0}.Release|Any CPU.Build.0 = Release|Any CPU
{71D8BDA5-6787-471A-8064-CEEE4203EBEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71D8BDA5-6787-471A-8064-CEEE4203EBEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71D8BDA5-6787-471A-8064-CEEE4203EBEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71D8BDA5-6787-471A-8064-CEEE4203EBEF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -420,9 +432,11 @@ Global
{098D1F9B-054D-4158-BB6C-AC908C4595F6} = {6D75D6A2-6ECD-4DE4-96C5-CAD7D134407A}
{1D8DBFC8-EC21-4DDA-9D88-DE7CA04C8449} = {DC47658A-F421-4BA4-B617-090A7DFB3900}
{7401429B-B842-4316-B7A2-B77E9AD966CB} = {6D75D6A2-6ECD-4DE4-96C5-CAD7D134407A}
{ACFF2B23-0518-493C-93A0-08CF9FD4F8E6} = {DC47658A-F421-4BA4-B617-090A7DFB3900}
{C10A11E5-4AD8-4229-81F1-57D7DC364E27} = {DC47658A-F421-4BA4-B617-090A7DFB3900}
{B1745099-0081-4443-BF79-26A888765E16} = {6D75D6A2-6ECD-4DE4-96C5-CAD7D134407A}
{5E178B0D-5F29-4990-8DCF-DC7FF113C4F0} = {DC47658A-F421-4BA4-B617-090A7DFB3900}
{71D8BDA5-6787-471A-8064-CEEE4203EBEF} = {6D75D6A2-6ECD-4DE4-96C5-CAD7D134407A}
{ACFF2B23-0518-493C-93A0-08CF9FD4F8E6} = {DC47658A-F421-4BA4-B617-090A7DFB3900}
{DE9532E8-F0ED-400B-9592-AF8F74BC83EB} = {6D75D6A2-6ECD-4DE4-96C5-CAD7D134407A}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion src/EvoSC/EvoSC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<ProjectReference Include="..\Modules\MatchManagerModule\MatchManagerModule.csproj" />
<ProjectReference Include="..\Modules\ASayModule\ASayModule.csproj" />
<ProjectReference Include="..\Modules\SpectatorTargetInfoModule\SpectatorTargetInfoModule.csproj" />
<ProjectReference Include="..\Modules\TeamInfoModule\TeamInfoModule.csproj" />
<ProjectReference Include="..\Modules\TeamSettingsModule\TeamSettingsModule.csproj" />
<ProjectReference Include="..\Modules\WorldRecordModule\WorldRecordModule.csproj" />
<ProjectReference Include="..\Modules\MotdModule\MotdModule.csproj" />
Expand All @@ -68,5 +69,4 @@
<ItemGroup>
<Folder Include="bin\Debug\net8.0\config\" />
</ItemGroup>

</Project>
6 changes: 4 additions & 2 deletions src/EvoSC/InternalModules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using EvoSC.Modules.Official.Scoreboard;
using EvoSC.Modules.Official.SetName;
using EvoSC.Modules.Official.SpectatorTargetInfoModule;
using EvoSC.Modules.Official.TeamInfoModule;
using EvoSC.Modules.Official.TeamSettingsModule;
using EvoSC.Modules.Official.WorldRecordModule;
using FluentMigrator.Runner.Exceptions;
Expand Down Expand Up @@ -55,7 +56,8 @@ public static class InternalModules
typeof(MapListModule),
typeof(LocalRecordsModule),
typeof(ForceTeamModule),
typeof(TeamSettingsModule)
typeof(TeamSettingsModule),
typeof(TeamInfoModule)
];

/// <summary>
Expand All @@ -77,7 +79,7 @@ public static void RunInternalModuleMigrations(this IMigrationManager migrations
}
}
}

/// <summary>
/// Load all internal modules.
/// </summary>
Expand Down
18 changes: 18 additions & 0 deletions src/Modules/TeamInfoModule/Config/ITeamInfoSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.ComponentModel;
using Config.Net;
using EvoSC.Modules.Attributes;

namespace EvoSC.Modules.Official.TeamInfoModule.Config;

[Settings]
public interface ITeamInfoSettings
{
[Option(DefaultValue = 0.0), Description("Specifies the horizontal center position of the widget.")]
public double X { get; set; }

[Option(DefaultValue = 80.0), Description("Specifies the vertical top edge position of the wigdet. Values from -90 to 90 allowed.")]
public double Y { get; set; }

[Option(DefaultValue = false), Description("If enabled a smaller version of the widget is shown, without the large team name.")]
public bool CompactMode { get; set; }
}
81 changes: 81 additions & 0 deletions src/Modules/TeamInfoModule/Controllers/TeamInfoEventController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using EvoSC.Common.Controllers;
using EvoSC.Common.Controllers.Attributes;
using EvoSC.Common.Events.Attributes;
using EvoSC.Common.Interfaces.Controllers;
using EvoSC.Common.Models;
using EvoSC.Common.Remote;
using EvoSC.Common.Remote.EventArgsModels;
using EvoSC.Modules.Official.TeamInfoModule.Interfaces;
using GbxRemoteNet.Events;

namespace EvoSC.Modules.Official.TeamInfoModule.Controllers;

[Controller]
public class TeamInfoEventController(ITeamInfoService teamInfoService) : EvoScController<IEventControllerContext>
{
[Subscribe(ModeScriptEvent.Scores)]
public async Task OnScoresAsync(object sender, ScoresEventArgs eventArgs)
{
var isTeamsModeActive = await teamInfoService.GetModeIsTeamsAsync();

if (!eventArgs.UseTeams)
{
if (!isTeamsModeActive)
{
return;
}

await teamInfoService.SetModeIsTeamsAsync(false);
await teamInfoService.HideTeamInfoWidgetEveryoneAsync();

return;
}

if (!isTeamsModeActive)
{
await teamInfoService.SetModeIsTeamsAsync(true);
}

var teamInfos = eventArgs.Teams.ToList();
var team1Points = teamInfos[0]!.MatchPoints;
var team2Points = teamInfos[1]!.MatchPoints;

if (eventArgs.Section is ModeScriptSection.EndRound or ModeScriptSection.Undefined)
{
await teamInfoService.UpdatePointsAsync(team1Points, team2Points);
}
}

[Subscribe(ModeScriptEvent.StartRoundStart)]
public async Task OnRoundStartAsync(object sender, RoundEventArgs args)
{
if (!await teamInfoService.GetModeIsTeamsAsync())
{
return;
}

await teamInfoService.UpdateRoundNumberAsync(args.Count);
}

[Subscribe(ModeScriptEvent.PodiumStart)]
public async Task OnPodiumStartAsync(object sender, PodiumEventArgs args)
{
if (!await teamInfoService.GetModeIsTeamsAsync())
{
return;
}

await teamInfoService.HideTeamInfoWidgetEveryoneAsync();
}

[Subscribe(GbxRemoteEvent.EndMap)]
public async Task OnEndMapAsync(object sender, MapGbxEventArgs args)
{
if (!await teamInfoService.GetModeIsTeamsAsync())
{
return;
}

await teamInfoService.HideTeamInfoWidgetEveryoneAsync();
}
}
81 changes: 81 additions & 0 deletions src/Modules/TeamInfoModule/Interfaces/ITeamInfoService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using EvoSC.Modules.Official.TeamInfoModule.Models;

namespace EvoSC.Modules.Official.TeamInfoModule.Interfaces;

public interface ITeamInfoService
{
/// <summary>
/// Triggers detection if team mode is active.
/// </summary>
/// <returns></returns>
public Task InitializeModuleAsync();

/// <summary>
/// Gets the current mode script settings for teams mode.
/// </summary>
/// <returns></returns>
public Task<ModeScriptTeamSettings> GetModeScriptTeamSettingsAsync();

/// <summary>
/// Get the text displayed at the bottom of the team info widget.
/// </summary>
/// <param name="modeScriptTeamSettings"></param>
/// <returns></returns>
public Task<string?> GetInfoBoxTextAsync(ModeScriptTeamSettings modeScriptTeamSettings);

/// <summary>
/// Gets all necessary data for the widget.
/// </summary>
/// <returns></returns>
public Task<dynamic> GetWidgetDataAsync();

/// <summary>
/// Determines whether a team has match point.
/// </summary>
/// <param name="teamPoints"></param>
/// <param name="opponentPoints"></param>
/// <param name="pointsLimit"></param>
/// <param name="pointsGap"></param>
/// <returns></returns>
public Task<bool> DoesTeamHaveMatchPointAsync(int teamPoints, int opponentPoints, int pointsLimit, int pointsGap);

/// <summary>
/// Sends the team info widget to all players.
/// </summary>
/// <returns></returns>
public Task SendTeamInfoWidgetEveryoneAsync();

/// <summary>
/// Hides the team info widget for all players.
/// </summary>
/// <returns></returns>
public Task HideTeamInfoWidgetEveryoneAsync();

/// <summary>
/// Sets the current round number.
/// </summary>
/// <param name="round"></param>
/// <returns></returns>
public Task UpdateRoundNumberAsync(int round);

/// <summary>
/// Updates the points for both teams.
/// </summary>
/// <param name="team1Points"></param>
/// <param name="team2Points"></param>
/// <returns></returns>
public Task UpdatePointsAsync(int team1Points, int team2Points);

/// <summary>
/// Tells whether the service is currently active for teams mode.
/// </summary>
/// <returns></returns>
public Task<bool> GetModeIsTeamsAsync();

/// <summary>
/// Sets whether the service is active for teams mode or not.
/// </summary>
/// <param name="modeIsTeams"></param>
/// <returns></returns>
public Task SetModeIsTeamsAsync(bool modeIsTeams);
}
19 changes: 19 additions & 0 deletions src/Modules/TeamInfoModule/Localization.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:element name="root" msdata:IsDataSet="true">
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
70 changes: 70 additions & 0 deletions src/Modules/TeamInfoModule/Models/ModeScriptTeamSettings.cs
araszka marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
namespace EvoSC.Modules.Official.TeamInfoModule.Models;

public class ModeScriptTeamSettings
{
/// <summary>
/// The amount of points a team has to reach to win the match.
/// </summary>
public int PointsLimit { init; get; } = 5;

/// <summary>
/// Finish timeout.
/// </summary>
public int FinishTimeout { init; get; } = -1;

/// <summary>
/// The maximum number of points attributed to the first player to cross the finish line.
/// </summary>
public int MaxPointsPerRound { init; get; } = 6;

/// <summary>
/// Defines how much points difference there has to be for a team to win (tennis mode).
/// </summary>
public int PointsGap { init; get; } = 1;

/// <summary>
/// Use a custom points repartition.
/// If false points repartition is [10, 6, 4, 3, 2, 1].
/// </summary>
public bool UseCustomPointsRepartition { init; get; } = false;

/// <summary>
/// At the end of the round both teams win their players points.
/// </summary>
public bool CumulatePoints { init; get; } = false;

/// <summary>
/// Number of rounds to play on one map, before going to the next one.
/// </summary>
public int RoundsPerMap { init; get; } = -1;

/// <summary>
/// Number of maps to play before the match ends.
/// </summary>
public int MapsPerMatch { init; get; } = -1;

/// <summary>
/// Continue to play the map until the tie is broken.
/// </summary>
public bool UseTieBreak { init; get; } = true;

/// <summary>
/// Number of warmups.
/// </summary>
public int WarmUpNb { init; get; } = 0;

/// <summary>
/// Duration of one warmup in seconds.
/// </summary>
public int WarmUpDuration { init; get; } = 0;

/// <summary>
/// Use alternate rules.
/// </summary>
public bool UseAlternateRules { init; get; } = true;

/// <summary>
/// Neutral emblem URL.
/// </summary>
public string NeutralEmblemUrl { init; get; } = "";
}
Loading
Loading