removed player left/joined, added round id (#59)
This commit is contained in:
@@ -638,7 +638,8 @@ namespace Content.Server.Administration.Systems
|
|||||||
{
|
{
|
||||||
Message = message,
|
Message = message,
|
||||||
Ckey = ckey,
|
Ckey = ckey,
|
||||||
Sender = sender
|
Sender = sender,
|
||||||
|
Rid = Get<GameTicker>().RoundId
|
||||||
};
|
};
|
||||||
|
|
||||||
_utkaSockets.SendMessageToAll(utkaAhelpEvent);
|
_utkaSockets.SendMessageToAll(utkaAhelpEvent);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Content.Server.Database;
|
using Content.Server.Database;
|
||||||
using Content.Server.UtkaIntegration;
|
|
||||||
using Content.Shared.GameTicking;
|
using Content.Shared.GameTicking;
|
||||||
using Content.Shared.GameWindow;
|
using Content.Shared.GameWindow;
|
||||||
using Content.Shared.Players;
|
using Content.Shared.Players;
|
||||||
@@ -17,7 +16,6 @@ namespace Content.Server.GameTicking
|
|||||||
{
|
{
|
||||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||||
[Dependency] private readonly IServerDbManager _dbManager = default!;
|
[Dependency] private readonly IServerDbManager _dbManager = default!;
|
||||||
[Dependency] private readonly UtkaTCPWrapper _utkaSockets = default!; // WD
|
|
||||||
|
|
||||||
private void InitializePlayer()
|
private void InitializePlayer()
|
||||||
{
|
{
|
||||||
@@ -67,14 +65,6 @@ namespace Content.Server.GameTicking
|
|||||||
? Loc.GetString("player-first-join-message", ("name", args.Session.Name))
|
? Loc.GetString("player-first-join-message", ("name", args.Session.Name))
|
||||||
: Loc.GetString("player-join-message", ("name", args.Session.Name)));
|
: Loc.GetString("player-join-message", ("name", args.Session.Name)));
|
||||||
|
|
||||||
//WD start
|
|
||||||
var utkaPlayerJoined = new UtkaPlayerJoinedEvent()
|
|
||||||
{
|
|
||||||
Ckey = args.Session.Name
|
|
||||||
};
|
|
||||||
_utkaSockets.SendMessageToAll(utkaPlayerJoined);
|
|
||||||
//WD end
|
|
||||||
|
|
||||||
if (LobbyEnabled && _roundStartCountdownHasNotStartedYetDueToNoPlayers)
|
if (LobbyEnabled && _roundStartCountdownHasNotStartedYetDueToNoPlayers)
|
||||||
{
|
{
|
||||||
_roundStartCountdownHasNotStartedYetDueToNoPlayers = false;
|
_roundStartCountdownHasNotStartedYetDueToNoPlayers = false;
|
||||||
@@ -133,14 +123,6 @@ namespace Content.Server.GameTicking
|
|||||||
mind.Session = null;
|
mind.Session = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//WD start
|
|
||||||
var utkaPlayerLeft = new UtkaPlayerLeftEvent()
|
|
||||||
{
|
|
||||||
Ckey = args.Session.Name
|
|
||||||
};
|
|
||||||
_utkaSockets.SendMessageToAll(utkaPlayerLeft);
|
|
||||||
//WD end
|
|
||||||
|
|
||||||
if (_playerGameStatuses.ContainsKey(args.Session.UserId)) //WD-EDIT
|
if (_playerGameStatuses.ContainsKey(args.Session.UserId)) //WD-EDIT
|
||||||
_userDb.ClientDisconnected(session);
|
_userDb.ClientDisconnected(session);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -184,24 +184,9 @@ public sealed class UtkaAhelpPmEvent : UtkaBaseMessage
|
|||||||
|
|
||||||
[JsonPropertyName("sender")]
|
[JsonPropertyName("sender")]
|
||||||
public string? Sender { get; set; }
|
public string? Sender { get; set; }
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class UtkaPlayerJoinedEvent : UtkaBaseMessage
|
[JsonPropertyName("rid")]
|
||||||
{
|
public int? Rid { get; set; }
|
||||||
[JsonPropertyName("command")]
|
|
||||||
public override string? Command => "player_joined";
|
|
||||||
|
|
||||||
[JsonPropertyName("ckey")]
|
|
||||||
public string? Ckey { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class UtkaPlayerLeftEvent : UtkaBaseMessage
|
|
||||||
{
|
|
||||||
[JsonPropertyName("command")]
|
|
||||||
public override string? Command => "player_left";
|
|
||||||
|
|
||||||
[JsonPropertyName("ckey")]
|
|
||||||
public string? Ckey { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class UtkaBannedEvent : UtkaBaseMessage
|
public sealed class UtkaBannedEvent : UtkaBaseMessage
|
||||||
|
|||||||
Reference in New Issue
Block a user