Merge remote-tracking branch 'upstream/stable' into ed-08-07-2025-upstream

# Conflicts:
#	Content.Server/Audio/ContentAudioSystem.cs
#	Content.Server/Medical/HealthAnalyzerSystem.cs
#	Content.Server/Shuttles/Systems/ShuttleSystem.cs
#	Resources/Locale/en-US/navmap-beacons/station-beacons.ftl
This commit is contained in:
Ed
2025-07-08 00:40:30 +03:00
920 changed files with 19950 additions and 9262 deletions

View File

@@ -2,16 +2,15 @@
using Content.Server.Administration;
using Content.Server.Station.Systems;
using Content.Shared.Administration;
using JetBrains.Annotations;
using Robust.Shared.Console;
namespace Content.Server.AlertLevel.Commands
{
[UsedImplicitly]
[AdminCommand(AdminFlags.Fun)]
public sealed class SetAlertLevelCommand : LocalizedCommands
public sealed class SetAlertLevelCommand : LocalizedEntityCommands
{
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
[Dependency] private readonly AlertLevelSystem _alertLevelSystem = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
public override string Command => "setalertlevel";
@@ -21,11 +20,9 @@ namespace Content.Server.AlertLevel.Commands
var player = shell.Player;
if (player?.AttachedEntity != null)
{
var stationUid = _entitySystems.GetEntitySystem<StationSystem>().GetOwningStation(player.AttachedEntity.Value);
var stationUid = _stationSystem.GetOwningStation(player.AttachedEntity.Value);
if (stationUid != null)
{
levelNames = GetStationLevelNames(stationUid.Value);
}
}
return args.Length switch
@@ -60,7 +57,7 @@ namespace Content.Server.AlertLevel.Commands
return;
}
var stationUid = _entitySystems.GetEntitySystem<StationSystem>().GetOwningStation(player.AttachedEntity.Value);
var stationUid = _stationSystem.GetOwningStation(player.AttachedEntity.Value);
if (stationUid == null)
{
shell.WriteLine(LocalizationManager.GetString("cmd-setalertlevel-invalid-grid"));
@@ -75,13 +72,12 @@ namespace Content.Server.AlertLevel.Commands
return;
}
_entitySystems.GetEntitySystem<AlertLevelSystem>().SetLevel(stationUid.Value, level, true, true, true, locked);
_alertLevelSystem.SetLevel(stationUid.Value, level, true, true, true, locked);
}
private string[] GetStationLevelNames(EntityUid station)
{
var entityManager = IoCManager.Resolve<IEntityManager>();
if (!entityManager.TryGetComponent<AlertLevelComponent>(station, out var alertLevelComp))
if (!EntityManager.TryGetComponent<AlertLevelComponent>(station, out var alertLevelComp))
return new string[]{};
if (alertLevelComp.AlertLevels == null)