Decouple Lights from Toggleable Visuals (and headphone music notes bugfix) (#35341)
* - Combine enum keys `ToggleableLightVisuals` and `ToggleVisuals` into `ToggleableVisuals` - Rename `ToggleableLightVisualsComponent` to `ToggleableVisualsComponent` and `ToggleableLightVisualsSystem` to `ToggleableVisualsSystem` - (The `SpriteLayer` field on the component is now required because the old default of `light` doesn't make sense anymore) - Make it so that `ToggleableVisualsComponent` works even when there's not a light attached to the entity - (Amazingly this seems to have only applied to Headphones, but I can only imagine there are many other things people would like to do with simple toggleable visuals) - Explicitly make `ItemTogglePointLightComponent`'s purpose to make `ToggleVisualsComponent` apply to `PointLightComponent`s on the same entity. - Add field `ToggleableVisualsColorModulatesLights`, which makes the `Color` appearance value of `ToggleableVisuals` modulate the color of lights on the same entity - Lots of prototype updates to uptake the above * fix bad merge * unbork robust * blindly letting rider reformat stuff * I guess I never cleaned up these imports at all
This commit is contained in:
@@ -204,7 +204,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
|
||||
|
||||
TryComp<AppearanceComponent>(gunUid, out var appearance);
|
||||
_appearance.SetData(gunUid, TetherVisualsStatus.Key, true, appearance);
|
||||
_appearance.SetData(gunUid, ToggleableLightVisuals.Enabled, true, appearance);
|
||||
_appearance.SetData(gunUid, ToggleableVisuals.Enabled, true, appearance);
|
||||
|
||||
// Target updates
|
||||
TransformSystem.Unanchor(target, targetXform);
|
||||
@@ -280,7 +280,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
|
||||
|
||||
TryComp<AppearanceComponent>(gunUid, out var appearance);
|
||||
_appearance.SetData(gunUid, TetherVisualsStatus.Key, false, appearance);
|
||||
_appearance.SetData(gunUid, ToggleableLightVisuals.Enabled, false, appearance);
|
||||
_appearance.SetData(gunUid, ToggleableVisuals.Enabled, false, appearance);
|
||||
|
||||
RemComp<TetheredComponent>(component.Tethered.Value);
|
||||
_blocker.UpdateCanMove(component.Tethered.Value);
|
||||
|
||||
Reference in New Issue
Block a user