Files
crystall-punk-14/Content.Server/_CP14/CloudShadow/CP14CloudShadowsSystem.cs
Ed 1867903c46 Planetarization (#1040)
* tiers to level demiplanes

* Update demiplane_keys.yml

* demiplane on planets

* migrate to wizden dayCycle + planetarize Comoss

* Update comoss_d.yml

* Update audio_music.yml

* Update dev_map.yml

* add shadows to demiplanes

* remove outdated systems

* fix silvas

* silva fix

* Update factoria.yml

* Update island.yml
2025-03-19 12:52:37 +03:00

22 lines
608 B
C#

using Content.Shared._CP14.CloudShadow;
using Robust.Shared.Random;
namespace Content.Server._CP14.CloudShadow;
public sealed class CP14CloudShadowsSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14CloudShadowsComponent, MapInitEvent>(OnMapInit);
}
private void OnMapInit(Entity<CP14CloudShadowsComponent> entity, ref MapInitEvent args)
{
entity.Comp.CloudSpeed = _random.NextVector2(-entity.Comp.MaxSpeed, entity.Comp.MaxSpeed);
}
}