removes componentdependencies (#6160)
This commit is contained in:
@@ -32,11 +32,5 @@ namespace Content.Server.Light.Components
|
||||
/// Sound played when you ignite the matchstick.
|
||||
/// </summary>
|
||||
[DataField("igniteSound", required: true)] public SoundSpecifier IgniteSound = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Point light component. Gives matches a glow in dark effect.
|
||||
/// </summary>
|
||||
[ComponentDependency]
|
||||
public readonly PointLightComponent? PointLightComponent = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Smoking;
|
||||
using Content.Shared.Temperature;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -85,9 +86,9 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
component.CurrentState = value;
|
||||
|
||||
if (component.PointLightComponent != null)
|
||||
if (TryComp<PointLightComponent>(component.Owner, out var pointLightComponent))
|
||||
{
|
||||
component.PointLightComponent.Enabled = component.CurrentState == SmokableState.Lit;
|
||||
pointLightComponent.Enabled = component.CurrentState == SmokableState.Lit;
|
||||
}
|
||||
|
||||
if (EntityManager.TryGetComponent(component.Owner, out SharedItemComponent? item))
|
||||
|
||||
Reference in New Issue
Block a user