Files
crystall-punk-14/Content.Shared/_CP14/MagicLantern/CP14MagicLanternSystem.cs
Ed 16a0b99daf Magic crystal lanterns + Aftertest balance (#532)
* lamp visual update

* deleete ice floor spell

* mana gift spell

* magic lantern

* wallmount crystal lamps

* QoL

* crafting

* Update StyleNano.cs

* examining simplify

* rings name

* remove snakes modifier

* trinkets update

* remove snakes, add boars and rabbits to demiplans

* Update flashlight.yml

* fix

* Update test.yml

* Update migration.yml

* ыы
2024-11-04 00:55:15 +03:00

26 lines
763 B
C#

using Content.Shared._CP14.MagicEnergy.Components;
namespace Content.Shared._CP14.MagicLantern;
public partial class CP14MagicLanternSystem : EntitySystem
{
[Dependency] private readonly SharedPointLightSystem _pointLight = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14MagicLanternComponent, CP14SlotCrystalPowerChangedEvent>(OnSlotPowerChanged);
}
private void OnSlotPowerChanged(Entity<CP14MagicLanternComponent> ent, ref CP14SlotCrystalPowerChangedEvent args)
{
SharedPointLightComponent? pointLight = null;
if (_pointLight.ResolveLight(ent, ref pointLight))
{
_pointLight.SetEnabled(ent, args.Powered, pointLight);
}
}
}