[Feat] Респект и уважуха (#476)
* db * wd comment * manager & commands * system & round end results * raise ban event * client manager & cached values * role pick tweak * tweak last commit * more fixes * weights fix * Fix for short rounds * tweak in cached dictionary * reva pick system * fix last commit * cult role pick * nukeops role picking * fix cache in async & show command * ooc msg show value * move pick method to manager & traitor pick fix
This commit is contained in:
@@ -23,6 +23,7 @@ using Content.Client.Viewport;
|
||||
using Content.Client.Voting;
|
||||
using Content.Client.White.JoinQueue;
|
||||
using Content.Client.White.Jukebox;
|
||||
using Content.Client.White.Reputation;
|
||||
using Content.Client.White.Sponsors;
|
||||
using Content.Shared.Ame;
|
||||
using Content.Client.White.Stalin;
|
||||
@@ -82,6 +83,7 @@ namespace Content.Client.Entry
|
||||
[Dependency] private readonly StalinManager _stalinManager = default!;
|
||||
[Dependency] private readonly ClientJukeboxSongsSyncManager _jukeboxSyncManager = default!;
|
||||
[Dependency] private readonly TTSManager _ttsManager = default!;
|
||||
[Dependency] private readonly ReputationManager _reputationManager = default!;
|
||||
//WD-EDIT
|
||||
|
||||
public override void Init()
|
||||
@@ -189,6 +191,7 @@ namespace Content.Client.Entry
|
||||
_queueManager.Initialize();
|
||||
_jukeboxSyncManager.Initialize();
|
||||
_ttsManager.Initialize();
|
||||
_reputationManager.Initialize();
|
||||
//WD-EDIT
|
||||
|
||||
_baseClient.RunLevelChanged += (_, args) =>
|
||||
|
||||
@@ -19,6 +19,7 @@ using Content.Client.Guidebook;
|
||||
using Content.Client.Replay;
|
||||
using Content.Client.White.JoinQueue;
|
||||
using Content.Client.White.Jukebox;
|
||||
using Content.Client.White.Reputation;
|
||||
using Content.Client.White.Sponsors;
|
||||
using Content.Client.White.Stalin;
|
||||
using Content.Client.White.Trail.Line.Manager;
|
||||
@@ -59,6 +60,7 @@ namespace Content.Client.IoC
|
||||
IoCManager.Register<ClientJukeboxSongsSyncManager>();
|
||||
IoCManager.Register<TTSManager>();
|
||||
IoCManager.Register<ITrailLineManager, TrailSplineManager>();
|
||||
IoCManager.Register<ReputationManager>();
|
||||
//WD-EDIT
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Client.RoundEnd
|
||||
{
|
||||
_entityManager = entityManager;
|
||||
|
||||
MinSize = SetSize = new Vector2(520, 580);
|
||||
MinSize = SetSize = new Vector2(800, 580);
|
||||
|
||||
Title = Loc.GetString("round-end-summary-window-title");
|
||||
|
||||
@@ -155,7 +155,8 @@ namespace Content.Client.RoundEnd
|
||||
("playerOOCName", playerInfo.PlayerOOCName),
|
||||
("icNameColor", icNameColor),
|
||||
("playerICName", playerInfo.PlayerICName),
|
||||
("playerRole", Loc.GetString(playerInfo.Role))));
|
||||
("playerRole", Loc.GetString(playerInfo.Role)),
|
||||
("reputation", playerInfo.Reputation)));
|
||||
}
|
||||
}
|
||||
hBox.AddChild(playerInfoText);
|
||||
|
||||
23
Content.Client/White/Reputation/ReputationManager.cs
Normal file
23
Content.Client/White/Reputation/ReputationManager.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared.White.Reputation;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Client.White.Reputation;
|
||||
|
||||
public sealed class ReputationManager
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _netMgr = default!;
|
||||
|
||||
private ReputationInfo? _info;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
_netMgr.RegisterNetMessage<ReputationNetMsg>(msg => _info = msg.Info);
|
||||
}
|
||||
|
||||
public bool TryGetInfo([NotNullWhen(true)] out float? value)
|
||||
{
|
||||
value = _info?.Value;
|
||||
return _info != null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user