Bugfixes (#69)
* - fix: Fix bans. * - fix: Fix all roles for admins. * - fix: No command headrevs. * - tweak: Now round ends on rev win. * - fix: Ash now smimmune. * - fix: Ghost role cvar fix. * - fix: Security icons only work on humans.
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Linq;
|
||||
using Content.Shared._Miracle.Components;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.IdentityManagement.Components;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Mindshield.Components;
|
||||
@@ -31,10 +32,10 @@ public sealed class ShowSecurityIconsSystem : EquipmentHudSystem<ShowSecurityIco
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<StatusIconComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent);
|
||||
SubscribeLocalEvent<HumanoidAppearanceComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent);
|
||||
}
|
||||
|
||||
private void OnGetStatusIconsEvent(EntityUid uid, StatusIconComponent _, ref GetStatusIconsEvent @event)
|
||||
private void OnGetStatusIconsEvent(EntityUid uid, HumanoidAppearanceComponent _, ref GetStatusIconsEvent @event)
|
||||
{
|
||||
if (!IsActive || @event.InContainer)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Client.Administration.Managers;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Players;
|
||||
using Content.Shared.Players.PlayTimeTracking;
|
||||
@@ -20,6 +21,7 @@ public sealed class JobRequirementsManager
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypes = default!;
|
||||
[Dependency] private readonly IClientAdminManager _adminManager = default!; // WD
|
||||
|
||||
private readonly Dictionary<string, TimeSpan> _roles = new();
|
||||
private readonly List<string> _roleBans = new();
|
||||
@@ -37,6 +39,7 @@ public sealed class JobRequirementsManager
|
||||
_net.RegisterNetMessage<MsgPlayTime>(RxPlayTime);
|
||||
|
||||
_client.RunLevelChanged += ClientOnRunLevelChanged;
|
||||
_adminManager.AdminStatusUpdated += () => Updated?.Invoke(); // WD
|
||||
}
|
||||
|
||||
private void ClientOnRunLevelChanged(object? sender, RunLevelChangedEventArgs e)
|
||||
@@ -98,6 +101,9 @@ public sealed class JobRequirementsManager
|
||||
if (player == null)
|
||||
return true;
|
||||
|
||||
if (_adminManager.IsActive()) // WD
|
||||
return true;
|
||||
|
||||
return CheckRoleTime(job.Requirements, out reason);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user