Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Feb 19, 2024
1 parent 10e173b commit 48906fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Content.Client/Backmen/Sponsors/SponsorsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace Content.Client.Backmen.Sponsors;
public sealed class SponsorsManager : IClientSponsorsManager
{
[Dependency] private readonly IClientNetManager _netMgr = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;

public void Initialize()
{
Expand All @@ -18,7 +17,7 @@ public void Initialize()

private void RxWhitelist(Shared.Backmen.MsgWhitelist message)
{
_entityManager.System<WL.WhitelistSystem>().Whitelisted = message.Whitelisted;
Whitelisted = message.Whitelisted;
}

private void OnUpdate(MsgSponsorInfo message)
Expand Down Expand Up @@ -56,4 +55,5 @@ private void Reset()

public HashSet<string> Prototypes { get; } = new();
public int Tier { get; private set; } = 0;
public bool Whitelisted { get; private set; } = false;
}
7 changes: 5 additions & 2 deletions Content.Client/Backmen/WL/WhitelistSystem.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using Content.Shared.Backmen.WL;
using Content.Corvax.Interfaces.Client;
using Content.Shared.Backmen.WL;
using Content.Shared.Species.Components;
using Robust.Shared.Network;

namespace Content.Client.Backmen.WL;

public sealed class WhitelistSystem : SharedWhitelistSystem
{
[Dependency] private readonly IClientSponsorsManager _sponsorsManager = default!;

public override void Initialize()
{
base.Initialize();
Expand All @@ -16,5 +19,5 @@ public override void ProcessReform(EntityUid child, Entity<ReformComponent> sour
// noop
}

public bool Whitelisted { get; internal set; }
public bool Whitelisted => _sponsorsManager.Whitelisted;
}
1 change: 1 addition & 0 deletions Content.Client/Corvax/IClientSponsorsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ public interface IClientSponsorsManager : ISharedSponsorsManager
{
public HashSet<string> Prototypes { get; }
public int Tier { get; }
public bool Whitelisted { get; }
}

0 comments on commit 48906fb

Please sign in to comment.