-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
730 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using EvoSC.Common.Util.EnumIdentifier; | ||
|
||
namespace EvoSC.Common.Interfaces.Models; | ||
|
||
public enum PlayerTeam | ||
{ | ||
/// <summary> | ||
/// Player is in an unknown team, for example | ||
/// in a mode that doesn't support teams. | ||
/// </summary> | ||
[Identifier(Name = "-1")] | ||
Unknown = -1, | ||
|
||
/// <summary> | ||
/// The first/blue/left team. | ||
/// </summary> | ||
[Identifier(Name = "0")] | ||
Team1 = 0, | ||
|
||
/// <summary> | ||
/// The second/red/right team. | ||
/// </summary> | ||
[Identifier(Name = "1")] | ||
Team2 = 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/Modules/ForceTeamModule/Controllers/ForceTeamCommandController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using EvoSC.Commands.Attributes; | ||
using EvoSC.Commands.Interfaces; | ||
using EvoSC.Common.Controllers; | ||
using EvoSC.Common.Controllers.Attributes; | ||
using EvoSC.Modules.Official.ForceTeamModule.Interfaces; | ||
using EvoSC.Modules.Official.ForceTeamModule.Permissions; | ||
|
||
namespace EvoSC.Modules.Official.ForceTeamModule.Controllers; | ||
|
||
[Controller] | ||
public class ForceTeamCommandController(IForceTeamService forceTeamService) : EvoScController<ICommandInteractionContext> | ||
{ | ||
[ChatCommand("forceteam", "Force players to teams.", ForceTeamPermissions.ForcePlayerTeam)] | ||
[CommandAlias("/ft", hide: true)] | ||
public Task ForceTeamAsync() => forceTeamService.ShowWindowAsync(Context.Player); | ||
|
||
[ChatCommand("autobalance", "Auto balance players into the teams.", ForceTeamPermissions.AutoTeamBalance)] | ||
public Task AutoBalanceAsync() => forceTeamService.BalanceTeamsAsync(); | ||
} |
Oops, something went wrong.