Фичи для педалей (#202)

This commit is contained in:
Aviu00
2023-07-16 11:32:42 +03:00
committed by Aviu00
parent 65ef100acd
commit 3f8ff32206
21 changed files with 337 additions and 32 deletions

View File

@@ -7,6 +7,7 @@ using Content.Shared.Movement.Events;
using Content.Shared.Physics.Pull;
using Content.Shared.Tag;
using Content.Shared.Verbs;
using Content.Shared.White.Administration;
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Robust.Shared.Map.Events;
@@ -128,6 +129,11 @@ public sealed class FollowerSystem : EntitySystem
/// <param name="entity">The entity to be followed</param>
public void StartFollowingEntity(EntityUid follower, EntityUid entity)
{
// WD
if (!EntityManager.HasComponent<InvisibilityComponent>(follower) &&
EntityManager.TryGetComponent(entity, out InvisibilityComponent? component) && component.Invisible)
return;
// No recursion for you
var targetXform = Transform(entity);
while (targetXform.ParentUid.IsValid())