Refactor LightBehaviorSystem to remove obsolete code (#30890)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user