Files
crystall-punk-14/Content.Client/_CP14/Vampire/CP14ClientVampireVisualsSystem.cs
Ed 0b5712ce97 Vampire antag (#988)
* new blood types

* vampire systems setup

* death under sun

* vampire blood nutrition

* alerts

* autolearn skills

* base bite actions

* suck blood spell

* polish

* Update blood.yml

* unshitcode

* vampire hunger visual

* nerf speed

* hypnosis + map update

* darkness demiplane warning
2025-03-07 14:52:43 +03:00

32 lines
1.1 KiB
C#

using Content.Shared._CP14.Vampire;
using Content.Shared.Humanoid;
using Robust.Client.GameObjects;
namespace Content.Client._CP14.Vampire;
public sealed class CP14ClientVampireVisualsSystem : CP14SharedVampireVisualsSystem
{
protected override void OnVampireVisualsInit(Entity<CP14VampireVisualsComponent> vampire, ref ComponentInit args)
{
base.OnVampireVisualsInit(vampire, ref args);
if (!EntityManager.TryGetComponent(vampire, out SpriteComponent? sprite))
return;
if (sprite.LayerMapTryGet(vampire.Comp.FangsMap, out var fangsLayerIndex))
sprite.LayerSetVisible(fangsLayerIndex, true);
}
protected override void OnVampireVisualsShutdown(Entity<CP14VampireVisualsComponent> vampire, ref ComponentShutdown args)
{
base.OnVampireVisualsShutdown(vampire, ref args);
if (!EntityManager.TryGetComponent(vampire, out SpriteComponent? sprite))
return;
if (sprite.LayerMapTryGet(vampire.Comp.FangsMap, out var fangsLayerIndex))
sprite.LayerSetVisible(fangsLayerIndex, false);
}
}