]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Decouple Lights from Toggleable Visuals (and headphone music notes bugfix) (#35341)
authorCentronias <me@centronias.com>
Fri, 30 May 2025 23:53:56 +0000 (16:53 -0700)
committerGitHub <noreply@github.com>
Fri, 30 May 2025 23:53:56 +0000 (19:53 -0400)
commit9053c9692f4bd0f3a34fe16c7737947b0b0bc452
tree40bfe222a879b81b7303d7b268c82c5bb5a1636d
parent85636335ec7223c2d368759bfc4929102794a628
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
48 files changed:
Content.Client/Light/HandheldLightSystem.cs
Content.Client/Toggleable/ToggleableLightVisualsComponent.cs [deleted file]
Content.Client/Toggleable/ToggleableLightVisualsSystem.cs [deleted file]
Content.Client/Toggleable/ToggleableVisualsComponent.cs [new file with mode: 0644]
Content.Client/Toggleable/ToggleableVisualsSystem.cs [new file with mode: 0644]
Content.Server/Atmos/EntitySystems/FlammableSystem.cs
Content.Shared/ContainerHeld/ContainerHeldComponent.cs
Content.Shared/ContainerHeld/ContainerHeldSystem.cs
Content.Shared/Item/ItemToggle/ItemToggleSystem.cs
Content.Shared/Light/Components/ItemTogglePointLightComponent.cs
Content.Shared/Light/EntitySystems/ItemTogglePointLightSystem.cs
Content.Shared/Light/SharedHandheldLightSystem.cs
Content.Shared/Toggleable/ToggleActionEvent.cs
Content.Shared/Toggleable/ToggleableLightVisuals.cs [deleted file]
Content.Shared/Weapons/Melee/EnergySword/EnergySwordSystem.cs
Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs
Resources/Prototypes/Entities/Clothing/Hands/gloves.yml
Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml
Resources/Prototypes/Entities/Clothing/Head/eva-helmets.yml
Resources/Prototypes/Entities/Clothing/Head/hardhats.yml
Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml
Resources/Prototypes/Entities/Clothing/Head/helmets.yml
Resources/Prototypes/Entities/Clothing/Neck/misc.yml
Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml
Resources/Prototypes/Entities/Clothing/Shoes/magboots.yml
Resources/Prototypes/Entities/Clothing/Shoes/misc.yml
Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
Resources/Prototypes/Entities/Objects/Fun/candy_bucket.yml
Resources/Prototypes/Entities/Objects/Fun/spectral_locator.yml
Resources/Prototypes/Entities/Objects/Fun/toys.yml
Resources/Prototypes/Entities/Objects/Misc/arabianlamp.yml
Resources/Prototypes/Entities/Objects/Misc/candles.yml
Resources/Prototypes/Entities/Objects/Misc/fire_extinguisher.yml
Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml
Resources/Prototypes/Entities/Objects/Misc/land_mine.yml
Resources/Prototypes/Entities/Objects/Shields/shields.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/defib.yml
Resources/Prototypes/Entities/Objects/Specific/Research/anomaly.yml
Resources/Prototypes/Entities/Objects/Specific/Salvage/scanner.yml
Resources/Prototypes/Entities/Objects/Tools/decoys.yml
Resources/Prototypes/Entities/Objects/Tools/flashlights.yml
Resources/Prototypes/Entities/Objects/Tools/lantern.yml
Resources/Prototypes/Entities/Objects/Tools/lighters.yml
Resources/Prototypes/Entities/Objects/Tools/welders.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/stunprod.yml
Resources/Prototypes/Entities/Objects/Weapons/security.yml