Merge remote-tracking branch 'upstream/stable' into ed-29-10-2024-upstream

# Conflicts:
#	Content.Server/Chat/Managers/ChatSanitizationManager.cs
#	Content.Server/Temperature/Systems/TemperatureSystem.cs
#	Content.Shared/Localizations/ContentLocalizationManager.cs
This commit is contained in:
Ed
2024-10-29 11:16:56 +03:00
388 changed files with 34535 additions and 18822 deletions

View File

@@ -2,7 +2,6 @@ using Content.Server.Emp;
using Content.Server.Popups;
using Content.Server.Power.Components;
using Content.Server.Power.Pow3r;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.APC;
using Content.Shared.Emag.Components;
@@ -71,11 +70,8 @@ public sealed class ApcSystem : EntitySystem
component.NeedStateUpdate = true;
}
//Update the HasAccess var for UI to read
private void OnBoundUiOpen(EntityUid uid, ApcComponent component, BoundUIOpenedEvent args)
{
// TODO: this should be per-player not stored on the apc
component.HasAccess = _accessReader.IsAllowed(args.Actor, uid);
UpdateApcState(uid, component);
}
@@ -165,7 +161,7 @@ public sealed class ApcSystem : EntitySystem
// TODO: Fix ContentHelpers or make a new one coz this is cooked.
var charge = ContentHelpers.RoundToNearestLevels(battery.CurrentStorage / battery.Capacity, 1.0, 100 / ChargeAccuracy) / 100f * ChargeAccuracy;
var state = new ApcBoundInterfaceState(apc.MainBreakerEnabled, apc.HasAccess,
var state = new ApcBoundInterfaceState(apc.MainBreakerEnabled,
(int) MathF.Ceiling(battery.CurrentSupply), apc.LastExternalState,
charge);