fixo (#348)
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Content.Client.Options.UI.Tabs
|
|||||||
ViewportLowResCheckBox.Pressed = !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
ViewportLowResCheckBox.Pressed = !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
||||||
ParallaxLowQualityCheckBox.Pressed = _cfg.GetCVar(CCVars.ParallaxLowQuality);
|
ParallaxLowQualityCheckBox.Pressed = _cfg.GetCVar(CCVars.ParallaxLowQuality);
|
||||||
FpsCounterCheckBox.Pressed = _cfg.GetCVar(CCVars.HudFpsCounterVisible);
|
FpsCounterCheckBox.Pressed = _cfg.GetCVar(CCVars.HudFpsCounterVisible);
|
||||||
LogInChatCheckBox.Pressed = _cfg.GetCVar(WhiteCVars.LogInChat);
|
LogInChatCheckBox.Pressed = _cfg.GetCVar(WhiteCVars.LogChatActions);
|
||||||
ViewportWidthSlider.Value = _cfg.GetCVar(CCVars.ViewportWidth);
|
ViewportWidthSlider.Value = _cfg.GetCVar(CCVars.ViewportWidth);
|
||||||
|
|
||||||
_cfg.OnValueChanged(CCVars.ViewportMinimumWidth, _ => UpdateViewportWidthRange());
|
_cfg.OnValueChanged(CCVars.ViewportMinimumWidth, _ => UpdateViewportWidthRange());
|
||||||
@@ -118,7 +118,7 @@ namespace Content.Client.Options.UI.Tabs
|
|||||||
_cfg.SetCVar(CCVars.ViewportScaleRender, !ViewportLowResCheckBox.Pressed);
|
_cfg.SetCVar(CCVars.ViewportScaleRender, !ViewportLowResCheckBox.Pressed);
|
||||||
_cfg.SetCVar(CCVars.ParallaxLowQuality, ParallaxLowQualityCheckBox.Pressed);
|
_cfg.SetCVar(CCVars.ParallaxLowQuality, ParallaxLowQualityCheckBox.Pressed);
|
||||||
_cfg.SetCVar(CCVars.HudFpsCounterVisible, FpsCounterCheckBox.Pressed);
|
_cfg.SetCVar(CCVars.HudFpsCounterVisible, FpsCounterCheckBox.Pressed);
|
||||||
_cfg.SetCVar(WhiteCVars.LogInChat, LogInChatCheckBox.Pressed);
|
_cfg.SetCVar(WhiteCVars.LogChatActions, LogInChatCheckBox.Pressed);
|
||||||
_cfg.SetCVar(CCVars.ViewportWidth, (int) ViewportWidthSlider.Value);
|
_cfg.SetCVar(CCVars.ViewportWidth, (int) ViewportWidthSlider.Value);
|
||||||
|
|
||||||
_cfg.SaveToFile();
|
_cfg.SaveToFile();
|
||||||
@@ -148,7 +148,7 @@ namespace Content.Client.Options.UI.Tabs
|
|||||||
var isVPResSame = ViewportLowResCheckBox.Pressed == !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
var isVPResSame = ViewportLowResCheckBox.Pressed == !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
||||||
var isPLQSame = ParallaxLowQualityCheckBox.Pressed == _cfg.GetCVar(CCVars.ParallaxLowQuality);
|
var isPLQSame = ParallaxLowQualityCheckBox.Pressed == _cfg.GetCVar(CCVars.ParallaxLowQuality);
|
||||||
var isFpsCounterVisibleSame = FpsCounterCheckBox.Pressed == _cfg.GetCVar(CCVars.HudFpsCounterVisible);
|
var isFpsCounterVisibleSame = FpsCounterCheckBox.Pressed == _cfg.GetCVar(CCVars.HudFpsCounterVisible);
|
||||||
var isLogInChatSame = LogInChatCheckBox.Pressed == _cfg.GetCVar(WhiteCVars.LogInChat);
|
var isLogInChatSame = LogInChatCheckBox.Pressed == _cfg.GetCVar(WhiteCVars.LogChatActions);
|
||||||
var isWidthSame = (int) ViewportWidthSlider.Value == _cfg.GetCVar(CCVars.ViewportWidth);
|
var isWidthSame = (int) ViewportWidthSlider.Value == _cfg.GetCVar(CCVars.ViewportWidth);
|
||||||
|
|
||||||
ApplyButton.Disabled = isVSyncSame &&
|
ApplyButton.Disabled = isVSyncSame &&
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ namespace Content.Client.Popups
|
|||||||
_overlay
|
_overlay
|
||||||
.AddOverlay(new PopupOverlay(_configManager, EntityManager, _playerManager, _prototype, _resource, _uiManager, this));
|
.AddOverlay(new PopupOverlay(_configManager, EntityManager, _playerManager, _prototype, _resource, _uiManager, this));
|
||||||
|
|
||||||
isLogging = _configManager.GetCVar(WhiteCVars.LogInChat);
|
isLogging = _configManager.GetCVar(WhiteCVars.LogChatActions);
|
||||||
_configManager.OnValueChanged(WhiteCVars.LogInChat, (log) => { isLogging = log; });
|
_configManager.OnValueChanged(WhiteCVars.LogChatActions, (log) => { isLogging = log; });
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Shutdown()
|
public override void Shutdown()
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ using Robust.Shared.Enums;
|
|||||||
using Content.Shared.Humanoid;
|
using Content.Shared.Humanoid;
|
||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared.PDA;
|
using Content.Shared.PDA;
|
||||||
|
using Content.Shared.White;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
|
|
||||||
namespace Content.Server.White.Other.ExamineSystem
|
namespace Content.Server.White.Other.ExamineSystem
|
||||||
@@ -16,6 +18,8 @@ namespace Content.Server.White.Other.ExamineSystem
|
|||||||
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
||||||
[Dependency] private readonly EntityManager _entityManager = default!;
|
[Dependency] private readonly EntityManager _entityManager = default!;
|
||||||
[Dependency] private readonly IConsoleHost _consoleHost = default!;
|
[Dependency] private readonly IConsoleHost _consoleHost = default!;
|
||||||
|
[Dependency] private readonly INetConfigurationManager _netConfigManager = default!;
|
||||||
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -23,7 +27,14 @@ namespace Content.Server.White.Other.ExamineSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void SendNoticeMessage(ActorComponent actorComponent, string message)
|
private void SendNoticeMessage(ActorComponent actorComponent, string message)
|
||||||
=> _consoleHost.RemoteExecuteCommand(actorComponent.PlayerSession, $"notice {message}");
|
{
|
||||||
|
var should = _netConfigManager.GetClientCVar(actorComponent.PlayerSession.ConnectedClient, WhiteCVars.LogChatActions);
|
||||||
|
|
||||||
|
if (should)
|
||||||
|
{
|
||||||
|
_consoleHost.RemoteExecuteCommand(actorComponent.PlayerSession, $"notice {message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void HandleExamine(EntityUid uid, ExaminableClothesComponent comp, ExaminedEvent args)
|
private void HandleExamine(EntityUid uid, ExaminableClothesComponent comp, ExaminedEvent args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -300,6 +300,6 @@ public sealed class WhiteCVars
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly CVarDef<bool> LoadERTMap = CVarDef.Create("white.ert_load", false, CVar.SERVERONLY);
|
public static readonly CVarDef<bool> LoadERTMap = CVarDef.Create("white.ert_load", false, CVar.SERVERONLY);
|
||||||
|
|
||||||
public static readonly CVarDef<bool> LogInChat =
|
public static readonly CVarDef<bool> LogChatActions =
|
||||||
CVarDef.Create("white.log_in_chat", true, CVar.CLIENTONLY | CVar.ARCHIVE);
|
CVarDef.Create("white.log_to_chat", true, CVar.CLIENT | CVar.ARCHIVE | CVar.REPLICATED);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user