Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Merge branch 'feat/csscommands' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Jan 7, 2024
2 parents 7204397 + e633b84 commit 61333f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ I dedicate a significant part of my free time to coding and developing meaningfu
- **`!mc_go`**: Use this command to immediately transition to the next map, without the need to wait for the current match to conclude.

### RTV
- **`!mc_vote`**: Vote for a map [RTV]. E.g `!mc_vote 5`
- **`!vote`**: Vote for a map [RTV]. E.g `!vote 5`

![img](https://drive.google.com/uc?export=view&id=18yyRQb2Z5mfOI7a_mkhCcudb8c0Tq_UJ)

Expand Down
8 changes: 4 additions & 4 deletions src/MapCycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public override void Load(bool hotReload)

if (Config.RtvEnabled)
{
AddCommand("mc_vote", "Get the next map of the cycle", _rtv.AddVote);
AddCommand("css_vote", "Get the next map of the cycle", _rtv.AddVote);

// Add the event to change the map when the vote is finished
_rtv.EndVoteEvent += (sender, e) =>
Expand Down Expand Up @@ -127,7 +127,7 @@ public override void Load(bool hotReload)
});
}

[ConsoleCommand("mc_nextmap", "Gets/sets the next map of the cycle")]
[ConsoleCommand("css_nextmap", "Gets/sets the next map of the cycle")]
public void OnSetNextCommand(CCSPlayerController? caller, CommandInfo info)
{
if(info.ArgCount == 1 || !AdminManager.PlayerHasPermissions(caller, "@css/changemap")) {
Expand All @@ -146,15 +146,15 @@ public void OnSetNextCommand(CCSPlayerController? caller, CommandInfo info)
}
}

[ConsoleCommand("mc_go", "Direct switch to the map you want of the cycle")]
[ConsoleCommand("css_go", "Direct switch to the map you want of the cycle")]
[RequiresPermissions("@css/changemap")]
[CommandHelper( whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
public void OnGoToNextMapCommand(CCSPlayerController? caller, CommandInfo info)
{
ChangeMap();
}

[ConsoleCommand("mc_goto", "Direct switch to the next map of the cycle")]
[ConsoleCommand("css_goto", "Direct switch to the next map of the cycle")]
[RequiresPermissions("@css/changemap")]
[CommandHelper(minArgs: 1, usage: "<#map name>", whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
public void OnGoToNextMapNamedCommand(CCSPlayerController? caller, CommandInfo info)
Expand Down

0 comments on commit 61333f2

Please sign in to comment.