From 33ef4d364f98a9cf66eb3666aad40c4ba124d529 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Wed, 14 Feb 2024 00:52:36 -0500 Subject: [PATCH] Lamia can now shoot over tail --- Content.Server/Nyanotrasen/Lamiae/LamiaSystem.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Server/Nyanotrasen/Lamiae/LamiaSystem.cs b/Content.Server/Nyanotrasen/Lamiae/LamiaSystem.cs index 55f28d3e03d..0fd1fd35c5c 100644 --- a/Content.Server/Nyanotrasen/Lamiae/LamiaSystem.cs +++ b/Content.Server/Nyanotrasen/Lamiae/LamiaSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Humanoid; using Content.Shared.Inventory.Events; using Content.Shared.Tag; +using Content.Shared.Standing; using Content.Shared.Storage.Components; using Robust.Shared.Prototypes; using Robust.Shared.Containers; @@ -24,6 +25,7 @@ public sealed partial class LamiaSystem : EntitySystem [Dependency] private readonly DamageableSystem _damageableSystem = default!; [Dependency] private readonly TagSystem _tagSystem = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + [Dependency] private readonly StandingStateSystem _standing = default!; [ValidatePrototypeId] private const string LamiaHardsuitTag = "AllowLamiaHardsuit"; @@ -81,6 +83,7 @@ public override void Initialize() SubscribeLocalEvent(OnDidEquipEvent); SubscribeLocalEvent(OnDidUnequipEvent); SubscribeLocalEvent(OnHitSelf); + SubscribeLocalEvent(TailCantStand); } /// @@ -94,6 +97,7 @@ public override void Initialize() private void OnSegmentSpawned(EntityUid uid, LamiaSegmentComponent component, SegmentSpawnedEvent args) { component.Lamia = args.Lamia; + _standing.Down(uid); if (!TryComp(uid, out var species)) return; if (!TryComp(args.Lamia, out var humanoid)) return; @@ -166,6 +170,11 @@ private void OnHitSelf(EntityUid uid, LamiaSegmentComponent component, ref Befor } } + private void TailCantStand(EntityUid uid, LamiaSegmentComponent component, StandAttemptEvent args) + { + args.Cancelled = true; + } + private void SpawnSegments(EntityUid uid, LamiaComponent component) { int i = 1;