Make paused poweredlights enabled (#14270)
This commit is contained in:
@@ -34,8 +34,14 @@ namespace Content.Server.Light.EntitySystems
|
|||||||
|
|
||||||
private void OnEmergencyPower(EntityUid uid, EmergencyLightComponent component, ref PowerChangedEvent args)
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateState(component);
|
UpdateState(component);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,6 +333,10 @@ namespace Content.Server.Light.EntitySystems
|
|||||||
|
|
||||||
private void OnPowerChanged(EntityUid uid, PoweredLightComponent component, ref PowerChangedEvent args)
|
private void OnPowerChanged(EntityUid uid, PoweredLightComponent component, ref PowerChangedEvent args)
|
||||||
{
|
{
|
||||||
|
// TODO: Power moment
|
||||||
|
if (MetaData(uid).EntityPaused)
|
||||||
|
return;
|
||||||
|
|
||||||
UpdateLight(uid, component);
|
UpdateLight(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,8 @@
|
|||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: off
|
state: off
|
||||||
|
- type: PointLight
|
||||||
|
enabled: true
|
||||||
- type: PoweredLight
|
- type: PoweredLight
|
||||||
hasLampOnSpawn: LightTube
|
hasLampOnSpawn: LightTube
|
||||||
damage:
|
damage:
|
||||||
@@ -282,6 +284,8 @@
|
|||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: off
|
state: off
|
||||||
|
- type: PointLight
|
||||||
|
enabled: true
|
||||||
- type: PoweredLight
|
- type: PoweredLight
|
||||||
hasLampOnSpawn: LightBulb
|
hasLampOnSpawn: LightBulb
|
||||||
damage:
|
damage:
|
||||||
|
|||||||
Reference in New Issue
Block a user