перенос файлов клиента из папки White в _White
This commit is contained in:
23
Content.Client/_White/Sponsors/SponsorsManager.cs
Normal file
23
Content.Client/_White/Sponsors/SponsorsManager.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared.White.Sponsors;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Client._White.Sponsors;
|
||||
|
||||
public sealed class SponsorsManager
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _netMgr = default!;
|
||||
|
||||
private SponsorInfo? _info;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
_netMgr.RegisterNetMessage<MsgSponsorInfo>(msg => _info = msg.Info);
|
||||
}
|
||||
|
||||
public bool TryGetInfo([NotNullWhen(true)] out SponsorInfo? sponsor)
|
||||
{
|
||||
sponsor = _info;
|
||||
return _info != null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user