Remove lights compref (#19531)
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Content.Client.Toggleable;
|
||||
public sealed class ToggleableLightVisualsSystem : VisualizerSystem<ToggleableLightVisualsComponent>
|
||||
{
|
||||
[Dependency] private readonly SharedItemSystem _itemSys = default!;
|
||||
[Dependency] private readonly SharedPointLightSystem _lights = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -40,9 +41,11 @@ public sealed class ToggleableLightVisualsSystem : VisualizerSystem<ToggleableLi
|
||||
if (TryComp(uid, out PointLightComponent? light))
|
||||
{
|
||||
DebugTools.Assert(!light.NetSyncEnabled, "light visualizers require point lights without net-sync");
|
||||
light.Enabled = enabled;
|
||||
_lights.SetEnabled(uid, enabled, light);
|
||||
if (enabled && modulate)
|
||||
light.Color = color;
|
||||
{
|
||||
_lights.SetColor(uid, color, light);
|
||||
}
|
||||
}
|
||||
|
||||
// update clothing & in-hand visuals.
|
||||
|
||||
Reference in New Issue
Block a user