Resolve all non-obsoleting warnings in content (#27934)

* Resolve all non-obsoleting warnings in content

* Update ClientGameTicker.cs

* Update SkeletonAccentSystem.cs

* Update BwoinkSystem.cs
This commit is contained in:
Kara
2024-05-11 20:13:58 -07:00
committed by GitHub
parent cf148288a0
commit 1596e04d0f
35 changed files with 32 additions and 70 deletions

View File

@@ -25,7 +25,7 @@ using Robust.Shared.Utility;
namespace Content.Server.Administration.Systems
{
[UsedImplicitly]
public sealed class BwoinkSystem : SharedBwoinkSystem
public sealed partial class BwoinkSystem : SharedBwoinkSystem
{
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IAdminManager _adminManager = default!;
@@ -36,6 +36,9 @@ namespace Content.Server.Administration.Systems
[Dependency] private readonly SharedMindSystem _minds = default!;
[Dependency] private readonly IAfkManager _afkManager = default!;
[GeneratedRegex(@"^https://discord\.com/api/webhooks/(\d+)/((?!.*/).*)$")]
private static partial Regex DiscordRegex();
private ISawmill _sawmill = default!;
private readonly HttpClient _httpClient = new();
private string _webhookUrl = string.Empty;
@@ -157,7 +160,7 @@ namespace Content.Server.Administration.Systems
return;
// Basic sanity check and capturing webhook ID and token
var match = Regex.Match(url, @"^https://discord\.com/api/webhooks/(\d+)/((?!.*/).*)$");
var match = DiscordRegex().Match(url);
if (!match.Success)
{