space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.62k stars 3.27k forks source link

Emergency lights (the ones that change with alert level) are supposed to become unpowered if their battery runs out #30799

Open Plykiya opened 1 month ago

Plykiya commented 1 month ago

Description

Does not actually happen

Reproduction

Screenshots

image

Additional context

Hreno commented 1 month ago

The problem is that, when placing the emergency light with admin mode, these entities don't have ActiveEmergencyLightComponent so the query here returns nothing: https://github.com/space-wizards/space-station-14/blob/c8f1c22ff2508a85f4fb909438e6fc5fd8481eaf/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs#L135

Looks like that as a workaround some maps explicitly set the ActiveEmergencyLight component to avoid this issue. https://github.com/space-wizards/space-station-14/blob/c8f1c22ff2508a85f4fb909438e6fc5fd8481eaf/Resources/Maps/Shuttles/emergency_meta.yml#L2892

But instead I think this component should be set to all emergency lights instead on spawn (or at least if there's electricity) - though I'm not 100%.