]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make paused poweredlights enabled (#14270)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Tue, 2 May 2023 14:57:48 +0000 (00:57 +1000)
committerGitHub <noreply@github.com>
Tue, 2 May 2023 14:57:48 +0000 (10:57 -0400)
Content.Server/Light/EntitySystems/EmergencyLightSystem.cs
Content.Server/Light/EntitySystems/PoweredLightSystem.cs
Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml

index de45b6c9830e19846b91736899aaef20fc9309c6..c18406564e90b7de807652575515ac887701e688 100644 (file)
@@ -34,8 +34,14 @@ namespace Content.Server.Light.EntitySystems
 
         private void OnEmergencyPower(EntityUid uid, EmergencyLightComponent component, ref PowerChangedEvent args)
         {
-            if (MetaData(uid).EntityLifeStage >= EntityLifeStage.Terminating)
+            var meta = MetaData(uid);
+
+            // TODO: PowerChangedEvent shouldn't be issued for paused ents but this is the world we live in.
+            if (meta.EntityLifeStage >= EntityLifeStage.Terminating ||
+                meta.EntityPaused)
+            {
                 return;
+            }
 
             UpdateState(component);
         }
index 9cd0c06dc4ab2ad783f806a98fa31ab0ebe1b57d..38632912a46e9355f252915c282dd1a2e26ac6f8 100644 (file)
@@ -333,6 +333,10 @@ namespace Content.Server.Light.EntitySystems
 
         private void OnPowerChanged(EntityUid uid, PoweredLightComponent component, ref PowerChangedEvent args)
         {
+            // TODO: Power moment
+            if (MetaData(uid).EntityPaused)
+                return;
+
             UpdateLight(uid, component);
         }
 
index aecaff15264f357866e899d8fca178dda6e14ff5..9abf8eef6003af660a049ee79753d5148cc4f14e 100644 (file)
   components:
   - type: Sprite
     state: off
+  - type: PointLight
+    enabled: true
   - type: PoweredLight
     hasLampOnSpawn: LightTube
     damage:
   components:
   - type: Sprite
     state: off
+  - type: PointLight
+    enabled: true
   - type: PoweredLight
     hasLampOnSpawn: LightBulb
     damage: