mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* Fix various light sources counting as Light, Give Skia spacewalk * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Replace the Ignore Gravity with Jetpack * Clean up event code + Avoid touching upstream code where possible * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Double cone, strategic untouches * Additional strategic untouch --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
23 lines
697 B
C#
23 lines
697 B
C#
using Content.Client.Light.Components;
|
|
using Content.Shared._DV.Light;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client._DV.Light.EntitySystems;
|
|
|
|
public sealed partial class ExpendableLightEnergySystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<ExpendableLightComponent, OnGetLightEnergyEvent>(GetLightEnergy);
|
|
}
|
|
private void GetLightEnergy(Entity<ExpendableLightComponent> ent, ref OnGetLightEnergyEvent args)
|
|
{
|
|
if (!TryComp<PointLightComponent>(ent, out var pointLight))
|
|
return;
|
|
args.LightEnergy = pointLight.Energy;
|
|
args.LightRadius = pointLight.Radius;
|
|
}
|
|
}
|