Refactor LightBehaviorSystem to remove obsolete code (#30890)

This commit is contained in:
Mervill
2024-08-10 18:45:37 -07:00
committed by GitHub
parent 09c8d4abd4
commit 32e315c68f
4 changed files with 168 additions and 168 deletions

View File

@@ -11,6 +11,7 @@ public sealed class ExpendableLightSystem : VisualizerSystem<ExpendableLightComp
{
[Dependency] private readonly PointLightSystem _pointLightSystem = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly LightBehaviorSystem _lightBehavior = default!;
public override void Initialize()
{
@@ -32,11 +33,11 @@ public sealed class ExpendableLightSystem : VisualizerSystem<ExpendableLightComp
if (AppearanceSystem.TryGetData<string>(uid, ExpendableLightVisuals.Behavior, out var lightBehaviourID, args.Component)
&& TryComp<LightBehaviourComponent>(uid, out var lightBehaviour))
{
lightBehaviour.StopLightBehaviour();
_lightBehavior.StopLightBehaviour((uid, lightBehaviour));
if (!string.IsNullOrEmpty(lightBehaviourID))
{
lightBehaviour.StartLightBehaviour(lightBehaviourID);
_lightBehavior.StartLightBehaviour((uid, lightBehaviour), lightBehaviourID);
}
else if (TryComp<PointLightComponent>(uid, out var light))
{