Remove lights compref (#19531)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Audio;
|
||||
using Content.Server.Construction;
|
||||
@@ -12,9 +11,7 @@ using Content.Shared.Maps;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Shuttles.Components;
|
||||
using Content.Shared.Temperature;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Collision.Shapes;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Events;
|
||||
@@ -32,6 +29,7 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
[Dependency] private readonly AmbientSoundSystem _ambient = default!;
|
||||
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
|
||||
[Dependency] private readonly DamageableSystem _damageable = default!;
|
||||
[Dependency] private readonly SharedPointLightSystem _light = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
// Essentially whenever thruster enables we update the shuttle's available impulses which are used for movement.
|
||||
@@ -287,9 +285,9 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
_appearance.SetData(uid, ThrusterVisualState.State, true, appearance);
|
||||
}
|
||||
|
||||
if (EntityManager.TryGetComponent(uid, out PointLightComponent? pointLightComponent))
|
||||
if (_light.TryGetLight(uid, out var pointLightComponent))
|
||||
{
|
||||
pointLightComponent.Enabled = true;
|
||||
_light.SetEnabled(uid, true, pointLightComponent);
|
||||
}
|
||||
|
||||
_ambient.SetAmbience(uid, true);
|
||||
@@ -376,9 +374,9 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
_appearance.SetData(uid, ThrusterVisualState.State, false, appearance);
|
||||
}
|
||||
|
||||
if (EntityManager.TryGetComponent(uid, out PointLightComponent? pointLightComponent))
|
||||
if (_light.TryGetLight(uid, out var pointLightComponent))
|
||||
{
|
||||
pointLightComponent.Enabled = false;
|
||||
_light.SetEnabled(uid, false, pointLightComponent);
|
||||
}
|
||||
|
||||
_ambient.SetAmbience(uid, false);
|
||||
|
||||
Reference in New Issue
Block a user