[feat] donate
# Conflicts: # Content.Client/Entry/EntryPoint.cs # Content.Client/IoC/ClientContentIoC.cs # Content.Server/Chat/Managers/ChatManager.cs # Content.Server/Entry/EntryPoint.cs # Content.Server/GameTicking/GameTicker.Player.cs # Content.Server/GameTicking/GameTicker.StatusShell.cs # Content.Server/IoC/ServerContentIoC.cs # Content.Shared/Humanoid/HumanoidCharacterAppearance.cs # Content.Shared/Humanoid/Markings/MarkingPrototype.cs # Content.Shared/Preferences/HumanoidCharacterProfile.cs
This commit is contained in:
@@ -7,7 +7,6 @@ using JetBrains.Annotations;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.GameTicking
|
||||
@@ -32,7 +31,7 @@ namespace Content.Server.GameTicking
|
||||
if (args.NewStatus != SessionStatus.Disconnected)
|
||||
{
|
||||
mind.Session = session;
|
||||
_pvsOverride.AddSessionOverride(GetNetEntity(mindId.Value), session);
|
||||
_pvsOverride.AddSessionOverride(mindId.Value, session);
|
||||
}
|
||||
|
||||
DebugTools.Assert(mind.Session == session);
|
||||
@@ -56,7 +55,7 @@ namespace Content.Server.GameTicking
|
||||
|
||||
// Make the player actually join the game.
|
||||
// timer time must be > tick length
|
||||
Timer.Spawn(0, () => _playerManager.JoinGame(args.Session));
|
||||
// Timer.Spawn(0, args.Session.JoinGame); // Moved to `JoinQueueManager`(WD-EDIT)
|
||||
|
||||
var record = await _dbManager.GetPlayerRecordByUserId(args.Session.UserId);
|
||||
var firstConnection = record != null &&
|
||||
@@ -124,7 +123,8 @@ namespace Content.Server.GameTicking
|
||||
mind.Session = null;
|
||||
}
|
||||
|
||||
_userDb.ClientDisconnected(session);
|
||||
if (_playerGameStatuses.ContainsKey(args.Session.UserId)) //WD-EDIT
|
||||
_userDb.ClientDisconnected(session);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ namespace Content.Server.GameTicking
|
||||
_playerGameStatuses[session.UserId] = PlayerGameStatus.JoinedGame;
|
||||
_db.AddRoundPlayers(RoundId, session.UserId);
|
||||
|
||||
RaiseNetworkEvent(new TickerJoinGameEvent(), session.ConnectedClient);
|
||||
RaiseNetworkEvent(new TickerJoinGameEvent(), session.Channel);
|
||||
}
|
||||
|
||||
private void PlayerJoinLobby(ICommonSession session)
|
||||
@@ -174,7 +174,7 @@ namespace Content.Server.GameTicking
|
||||
_playerGameStatuses[session.UserId] = LobbyEnabled ? PlayerGameStatus.NotReadyToPlay : PlayerGameStatus.ReadyToPlay;
|
||||
_db.AddRoundPlayers(RoundId, session.UserId);
|
||||
|
||||
var client = session.ConnectedClient;
|
||||
var client = session.Channel;
|
||||
RaiseNetworkEvent(new TickerJoinLobbyEvent(), client);
|
||||
RaiseNetworkEvent(GetStatusMsg(session), client);
|
||||
RaiseNetworkEvent(GetInfoMsg(), client);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json.Nodes;
|
||||
using Content.Server.White.JoinQueue;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.GameTicking;
|
||||
using Robust.Server.ServerStatus;
|
||||
@@ -28,6 +29,10 @@ namespace Content.Server.GameTicking
|
||||
/// </summary>
|
||||
[Dependency] private readonly SharedGameTicker _gameTicker = default!;
|
||||
|
||||
// WD-EDIT
|
||||
[Dependency] private readonly JoinQueueManager _queueManager = default!;
|
||||
// WD-EDIT
|
||||
|
||||
private void InitializeStatusShell()
|
||||
{
|
||||
IoCManager.Resolve<IStatusHost>().OnStatusRequest += GetStatusResponse;
|
||||
@@ -43,7 +48,7 @@ namespace Content.Server.GameTicking
|
||||
jObject["name"] = _baseServer.ServerName;
|
||||
jObject["map"] = _gameMapManager.GetSelectedMap()?.MapName;
|
||||
jObject["round_id"] = _gameTicker.RoundId;
|
||||
jObject["players"] = _playerManager.PlayerCount;
|
||||
jObject["players"] = _queueManager.ActualPlayersCount; //WD-EDIT
|
||||
jObject["soft_max_players"] = _cfg.GetCVar(CCVars.SoftMaxPlayers);
|
||||
jObject["panic_bunker"] = _cfg.GetCVar(CCVars.PanicBunkerEnabled);
|
||||
jObject["run_level"] = (int) _runLevel;
|
||||
|
||||
Reference in New Issue
Block a user