Files
Delta-v/Content.Client/LegallyDistinctSpaceFerret/CanHibernateSystem.cs
T
Hannah Giovanna Dawson e189a8f71f Skug brainrot wawa rain world backflip cat (#26168)
* wawa

* Minor cleanup, change intro/outro sfx

* Fix yaml

* wawaskillissue

* challenge

* Remove unusable audio, update spriting

* Kill remaining wawa sfx

* Fix name prefix

* these sound effects cost £460

* these attributations cost £0

* louder, mono wawa noises

* Audio fixes

* Tidy server system

* Code tidy-up, wawa

* Remove locstring hardcodes

* Bug fixes, wawa

* meta update, wawa

* Force antagprotoid to be hardcoded because yaml validation cringe, wawa
2024-03-27 23:25:17 +01:00

32 lines
720 B
C#

using Content.Shared.LegallyDistinctSpaceFerret;
using Robust.Client.Audio;
using Robust.Client.GameObjects;
using Robust.Shared.Audio;
namespace Content.Client.LegallyDistinctSpaceFerret;
public sealed class CanHibernateSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeNetworkEvent<EntityHasHibernated>(OnHibernateEvent);
}
public void OnHibernateEvent(EntityHasHibernated args)
{
if (!TryGetEntity(args.Hibernator, out var uid))
{
return;
}
if (!TryComp<SpriteComponent>(uid, out var comp))
{
return;
}
comp.LayerSetState(0, args.SpriteStateId);
}
}