diff --git a/Content.Server/Administration/Commands/RoleBanListCommand.cs b/Content.Server/Administration/Commands/RoleBanListCommand.cs index 6af17e6bc3d..c87a0b3b544 100644 --- a/Content.Server/Administration/Commands/RoleBanListCommand.cs +++ b/Content.Server/Administration/Commands/RoleBanListCommand.cs @@ -42,10 +42,9 @@ public async void Execute(IConsoleShell shell, string argStr, string[] args) } var targetUid = located.UserId; - var targetHWid = located.LastHWId; var targetAddress = located.LastAddress; - var bans = await _dbManager.GetServerRoleBansAsync(data.LastAddress, data.UserId, data.LastLegacyHWId, data.LastModernHWIds, includeUnbanned); + var bans = await dbMan.GetServerRoleBansAsync(targetAddress, targetUid, located.LastLegacyHWId, located.LastModernHWIds, includeUnbanned); if (bans.Count == 0) { diff --git a/Content.Server/Administration/Notes/AdminMessageEui.cs b/Content.Server/Administration/Notes/AdminMessageEui.cs index 94523634635..e53394ab47d 100644 --- a/Content.Server/Administration/Notes/AdminMessageEui.cs +++ b/Content.Server/Administration/Notes/AdminMessageEui.cs @@ -14,9 +14,11 @@ public sealed class AdminMessageEui : BaseEui { [Dependency] private readonly IAdminNotesManager _notesMan = default!; [Dependency] private readonly IConfigurationManager _cfg = default!; - private readonly float _closeWait; - private AdminMessageRecord? _message; - private DateTime _startTime; + [Dependency] private readonly IGameTiming _gameTiming = default!; + + private readonly TimeSpan _closeWait; + private readonly TimeSpan _endTime; + private readonly AdminMessageRecord[] _messages; public AdminMessageEui(AdminMessageRecord[] messages) { @@ -26,7 +28,7 @@ public AdminMessageEui(AdminMessageRecord[] messages) _messages = messages; } - public void SetMessage(AdminMessageRecord message) + public override void Opened() { StateDirty(); } @@ -35,9 +37,10 @@ public override EuiStateBase GetNewState() { return new AdminMessageEuiState( _closeWait, - _message.Message, - _message.CreatedBy?.LastSeenUserName ?? "[System]", - _message.CreatedAt.UtcDateTime + _messages.Select(x => new AdminMessageEuiState.Message( + x.Message, + x.CreatedBy?.LastSeenUserName ?? Loc.GetString("admin-notes-fallback-admin-name"), + x.CreatedAt.UtcDateTime)).ToArray() ); } diff --git a/Content.Server/Administration/Systems/AdminSystem.cs b/Content.Server/Administration/Systems/AdminSystem.cs index 08056936e87..5612d3717a0 100644 --- a/Content.Server/Administration/Systems/AdminSystem.cs +++ b/Content.Server/Administration/Systems/AdminSystem.cs @@ -78,7 +78,7 @@ public override void Initialize() Subs.CVar(_config, CCVars.PanicBunkerCountDeadminnedAdmins, OnPanicBunkerCountDeadminnedAdminsChanged, true); Subs.CVar(_config, CCVars.PanicBunkerShowReason, OnShowReasonChanged, true); Subs.CVar(_config, CCVars.PanicBunkerMinAccountAge, OnPanicBunkerMinAccountAgeChanged, true); - Subs.CVar(_config, CCVars.PanicBunkerMinOverallMinutes, OnPanicBunkerMinOverallMinutesChanged, true); + Subs.CVar(_config, CCVars.PanicBunkerMinOverallHours, OnPanicBunkerMinOverallHoursChanged, true); /* * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. diff --git a/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs b/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs index 01730ef5930..9e507eefae9 100644 --- a/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs +++ b/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.GameTicking.Components; using JetBrains.Annotations; using Robust.Shared.Configuration; +using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Toolshed; using Robust.Shared.Utility; diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 6cad299587c..4b506cc1200 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -840,17 +840,17 @@ private void OnItemToggle(EntityUid uid, ItemToggleMeleeWeaponComponent itemTogg if (itemToggleMelee.ActivatedSoundOnHitNoDamage != null) { //Setting the deactivated sound on no damage hit to the weapon's regular value before changing it. - itemToggleMelee.DeactivatedSoundOnHitNoDamage ??= meleeWeapon.NoDamageSound; - meleeWeapon.NoDamageSound = itemToggleMelee.ActivatedSoundOnHitNoDamage; - DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.NoDamageSound)); + itemToggleMelee.DeactivatedSoundOnHitNoDamage ??= meleeWeapon.SoundNoDamage; + meleeWeapon.SoundNoDamage = itemToggleMelee.ActivatedSoundOnHitNoDamage; + DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SoundNoDamage)); } if (itemToggleMelee.ActivatedSoundOnSwing != null) { //Setting the deactivated sound on no damage hit to the weapon's regular value before changing it. - itemToggleMelee.DeactivatedSoundOnSwing ??= meleeWeapon.SwingSound; - meleeWeapon.SwingSound = itemToggleMelee.ActivatedSoundOnSwing; - DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SwingSound)); + itemToggleMelee.DeactivatedSoundOnSwing ??= meleeWeapon.SoundSwing; + meleeWeapon.SoundSwing = itemToggleMelee.ActivatedSoundOnSwing; + DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SoundSwing)); } if (itemToggleMelee.DeactivatedSecret) @@ -866,19 +866,19 @@ private void OnItemToggle(EntityUid uid, ItemToggleMeleeWeaponComponent itemTogg DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.Damage)); } - meleeWeapon.HitSound = itemToggleMelee.DeactivatedSoundOnHit; - DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.HitSound)); + meleeWeapon.SoundHit = itemToggleMelee.DeactivatedSoundOnHit; + DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SoundHit)); if (itemToggleMelee.DeactivatedSoundOnHitNoDamage != null) { - meleeWeapon.NoDamageSound = itemToggleMelee.DeactivatedSoundOnHitNoDamage; - DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.NoDamageSound)); + meleeWeapon.SoundNoDamage = itemToggleMelee.DeactivatedSoundOnHitNoDamage; + DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SoundNoDamage)); } if (itemToggleMelee.DeactivatedSoundOnSwing != null) { - meleeWeapon.SwingSound = itemToggleMelee.DeactivatedSoundOnSwing; - DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SwingSound)); + meleeWeapon.SoundSwing = itemToggleMelee.DeactivatedSoundOnSwing; + DirtyField(uid, meleeWeapon, nameof(MeleeWeaponComponent.SoundSwing)); } if (itemToggleMelee.DeactivatedSecret)