ну я и че (#346)

* CheZaHuetaSystem

* CheZaHuetaSystem2

* в
This commit is contained in:
rhailrake
2023-08-29 05:59:14 +06:00
committed by Aviu00
parent 6d20951c5d
commit 00956b0fdb
18 changed files with 301 additions and 29 deletions

View File

@@ -1,6 +1,9 @@
using System.Linq;
using Content.Client.Chat.Managers;
using Content.Shared.Chat;
using Content.Shared.GameTicking;
using Content.Shared.Popups;
using Content.Shared.White;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
@@ -27,6 +30,7 @@ namespace Content.Client.Popups
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
[Dependency] private readonly IChatManager _chatManager = default!;
public IReadOnlyList<WorldPopupLabel> WorldLabels => _aliveWorldLabels;
public IReadOnlyList<CursorPopupLabel> CursorLabels => _aliveCursorLabels;
@@ -38,6 +42,8 @@ namespace Content.Client.Popups
public const float MaximumPopupLifetime = 5f;
public const float PopupLifetimePerCharacter = 0.04f;
private bool isLogging;
public override void Initialize()
{
SubscribeNetworkEvent<PopupCursorEvent>(OnPopupCursorEvent);
@@ -46,6 +52,9 @@ namespace Content.Client.Popups
SubscribeNetworkEvent<RoundRestartCleanupEvent>(OnRoundRestart);
_overlay
.AddOverlay(new PopupOverlay(_configManager, EntityManager, _playerManager, _prototype, _resource, _uiManager, this));
isLogging = _configManager.GetCVar(WhiteCVars.LogInChat);
_configManager.OnValueChanged(WhiteCVars.LogInChat, (log) => { isLogging = log; });
}
public override void Shutdown()
@@ -72,6 +81,11 @@ namespace Content.Client.Popups
};
_aliveWorldLabels.Add(label);
if (isLogging)
{
_chatManager.SendMessage($"notice {message}", ChatSelectChannel.Console);
}
}
#region Abstract Method Implementations