-
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.
Merge remote-tracking branch 'origin/master' into atomic-bugfixes
# Conflicts: # src/EvoSC.Common/Database/MigrationManager.cs # src/EvoSC.Common/Database/Migrations/202309211312_XPEvoValues.cs
- Loading branch information
Showing
24 changed files
with
622 additions
and
30 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
41 changes: 41 additions & 0 deletions
41
src/Modules/Scoreboard/Controllers/ScoreboardCommandsController.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,41 @@ | ||
using EvoSC.Commands.Attributes; | ||
using EvoSC.Commands.Interfaces; | ||
using EvoSC.Common.Controllers; | ||
using EvoSC.Common.Controllers.Attributes; | ||
using EvoSC.Common.Interfaces; | ||
using EvoSC.Common.Util; | ||
using EvoSC.Modules.Official.MatchManagerModule.Permissions; | ||
using EvoSC.Modules.Official.Scoreboard.Interfaces; | ||
|
||
namespace EvoSC.Modules.Official.Scoreboard.Controllers; | ||
|
||
[Controller] | ||
public class ScoreboardCommandsController : EvoScController<ICommandInteractionContext> | ||
{ | ||
private readonly IServerClient _server; | ||
private readonly IScoreboardService _scoreboardService; | ||
|
||
public ScoreboardCommandsController(IServerClient server, IScoreboardService scoreboardService) | ||
{ | ||
_server = server; | ||
_scoreboardService = scoreboardService; | ||
} | ||
|
||
[ChatCommand("sb", "[Command.ShowScoreboard]")] | ||
public async Task ShowScoreboard() | ||
{ | ||
await _scoreboardService.ShowScoreboard(Context.Player.GetLogin()); | ||
} | ||
|
||
[ChatCommand("fake", "[Command.FakePlayer]", MatchManagerPermissions.LoadMatchSettings)] | ||
public async Task FakePlayer() | ||
{ | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
await _server.Remote.ConnectFakePlayerAsync(); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/Modules/Scoreboard/Controllers/ScoreboardManialinkController.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,22 @@ | ||
using EvoSC.Common.Controllers.Attributes; | ||
using EvoSC.Common.Util; | ||
using EvoSC.Manialinks; | ||
using EvoSC.Modules.Official.Scoreboard.Interfaces; | ||
|
||
namespace EvoSC.Modules.Official.Scoreboard.Controllers; | ||
|
||
[Controller] | ||
public class ScoreboardManialinkController : ManialinkController | ||
{ | ||
private readonly IScoreboardService _scoreboardService; | ||
|
||
public ScoreboardManialinkController(IScoreboardService scoreboardService) | ||
{ | ||
_scoreboardService = scoreboardService; | ||
} | ||
|
||
public Task ResendScoreboardAsync() | ||
{ | ||
return _scoreboardService.ShowScoreboard(Context.Player.GetLogin()); | ||
} | ||
} |
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,24 @@ | ||
<component> | ||
<property type="string" name="accountId" /> | ||
<property type="int" name="cpIndex" /> | ||
<property type="int" name="time" /> | ||
|
||
<template> | ||
</template> | ||
|
||
<script><!-- | ||
#Struct EvoSC_CheckpointTime { | ||
Text AccountId; | ||
Integer CpIndex; | ||
Integer Time; | ||
} | ||
|
||
main() { | ||
declare EvoSC_CheckpointTime[Text] EvoCheckpointTimes for UI; | ||
declare Integer EvoCheckpointTimesUpdate for UI; | ||
|
||
EvoCheckpointTimes["{{ accountId }}"] = EvoSC_CheckpointTime{ AccountId = "{{ accountId }}", Time = {{ time }}, CpIndex = {{ cpIndex }} }; | ||
EvoCheckpointTimesUpdate = Now; | ||
} | ||
--></script> | ||
</component> |
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,22 @@ | ||
<component> | ||
<template> | ||
</template> | ||
|
||
<script><!-- | ||
#Struct EvoSC_CheckpointTime { | ||
Text AccountId; | ||
Integer CpIndex; | ||
Integer Time; | ||
} | ||
|
||
main() { | ||
declare EvoSC_CheckpointTime[Text] EvoCheckpointTimes for UI; | ||
declare Integer EvoCheckpointTimesUpdate for UI; | ||
declare Boolean EvoCheckpointTimesReset for UI = False; | ||
|
||
EvoCheckpointTimes = EvoSC_CheckpointTime[Text]; | ||
EvoCheckpointTimesUpdate = Now; | ||
EvoCheckpointTimesReset = True; | ||
} | ||
--></script> | ||
</component> |
Oops, something went wrong.