* 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
32 lines
1.1 KiB
C#
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);
|
|
}
|
|
}
|