diff --git a/Content.Client/Explosion/TriggerSystem.Proximity.cs b/Content.Client/Explosion/TriggerSystem.Proximity.cs index 41e4f914ff..d88bb4d449 100644 --- a/Content.Client/Explosion/TriggerSystem.Proximity.cs +++ b/Content.Client/Explosion/TriggerSystem.Proximity.cs @@ -30,7 +30,7 @@ public sealed partial class TriggerSystem { ComponentType = typeof(PointLightComponent), InterpolationMode = AnimationInterpolationMode.Nearest, - Property = nameof(PointLightComponent.Radius), + Property = nameof(PointLightComponent.AnimatedRadius), KeyFrames = { new AnimationTrackProperty.KeyFrame(0.1f, 0), diff --git a/Content.Client/Light/Components/LightBehaviourComponent.cs b/Content.Client/Light/Components/LightBehaviourComponent.cs index a89ddda108..b594411c35 100644 --- a/Content.Client/Light/Components/LightBehaviourComponent.cs +++ b/Content.Client/Light/Components/LightBehaviourComponent.cs @@ -24,7 +24,7 @@ namespace Content.Client.Light.Components [DataField("id")] public string ID { get; set; } = string.Empty; [DataField("property")] - public virtual string Property { get; protected set; } = "Radius"; + public virtual string Property { get; protected set; } = nameof(PointLightComponent.AnimatedRadius); [DataField("isLooped")] public bool IsLooped { get; set; } @@ -119,7 +119,7 @@ namespace Content.Client.Light.Components var playingTime = prevPlayingTime + frameTime; var interpolateValue = playingTime / MaxTime; - if (Property == "Enabled") // special case for boolean + if (Property == nameof(PointLightComponent.AnimatedEnable)) // special case for boolean { ApplyProperty(interpolateValue < 0.5f); return (-1, playingTime); @@ -181,7 +181,7 @@ namespace Content.Client.Light.Components var playingTime = prevPlayingTime + frameTime; var interpolateValue = playingTime / MaxTime; - if (Property == "Enabled") // special case for boolean + if (Property == nameof(PointLightComponent.AnimatedEnable)) // special case for boolean { ApplyProperty(interpolateValue < EndValue); return (-1, playingTime); @@ -245,7 +245,7 @@ namespace Content.Client.Light.Components public override void OnStart() { - if (Property == "Enabled") // special case for boolean, we randomize it + if (Property == nameof(PointLightComponent.AnimatedEnable)) // special case for boolean, we randomize it { ApplyProperty(_random.NextDouble() < 0.5); return; @@ -267,7 +267,7 @@ namespace Content.Client.Light.Components var playingTime = prevPlayingTime + frameTime; var interpolateValue = playingTime / MaxTime; - if (Property == "Enabled") + if (Property == nameof(PointLightComponent.AnimatedEnable)) { return (-1, playingTime); } @@ -298,7 +298,7 @@ namespace Content.Client.Light.Components public sealed partial class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks { [DataField("property")] - public override string Property { get; protected set; } = "Color"; + public override string Property { get; protected set; } = nameof(PointLightComponent.Color); [DataField("colors")] public List ColorsToCycle { get; set; } = new(); diff --git a/Content.Client/Light/Visualizers/PoweredLightVisualizerSystem.cs b/Content.Client/Light/Visualizers/PoweredLightVisualizerSystem.cs index 62af358c40..bf69053d9a 100644 --- a/Content.Client/Light/Visualizers/PoweredLightVisualizerSystem.cs +++ b/Content.Client/Light/Visualizers/PoweredLightVisualizerSystem.cs @@ -89,7 +89,7 @@ public sealed class PoweredLightVisualizerSystem : VisualizerSystem