private void OnInteractionAttempt(EntityUid uid, SubFloorHideComponent component, GettingInteractedWithAttemptEvent args)
 {
     // No interactions with entities hidden under floor tiles.
     if (component.BlockInteractions && component.IsUnderCover)
     {
         args.Cancel();
     }
 }
        private void OnSubFloorTerminating(EntityUid uid, SubFloorHideComponent component, ComponentShutdown _)
        {
            // If component is being deleted don't need to worry about updating any component stuff because it won't matter very shortly.
            if (EntityManager.GetComponent <MetaDataComponent>(uid).EntityLifeStage >= EntityLifeStage.Terminating)
            {
                return;
            }

            // Regardless of whether we're on a subfloor or not, unhide.
            component.IsUnderCover = false;
            UpdateAppearance(uid, component);
        }
 private void HandleAnchorChanged(EntityUid uid, SubFloorHideComponent component, ref AnchorStateChangedEvent args)
 {
     if (args.Anchored)
     {
         var xform = Transform(uid);
         _trayScannerSystem.OnSubfloorAnchored(uid, component, xform);
         UpdateFloorCover(uid, component, xform);
     }
     else if (component.IsUnderCover)
     {
         component.IsUnderCover = false;
         UpdateAppearance(uid, component);
     }
 }
 private void OnSubFloorStarted(EntityUid uid, SubFloorHideComponent component, ComponentStartup _)
 {
     UpdateFloorCover(uid, component);
     UpdateAppearance(uid, component);
     EntityManager.EnsureComponent <CollideOnAnchorComponent>(uid);
 }