コード例 #1
0
 private void OnUnanchorAttempt(EntityUid uid, ContainmentFieldGeneratorComponent component, UnanchorAttemptEvent args)
 {
     if (component.Enabled)
     {
         _popupSystem.PopupEntity(Loc.GetString("comp-containment-anchor-warning"), args.User, Filter.Entities(args.User));
         args.Cancel();
     }
 }
コード例 #2
0
 private void OnUnanchorAttempt(EntityUid uid, SubFloorHideComponent component, UnanchorAttemptEvent args)
 {
     // No un-anchoring things under the floor. Only required for something like vents, which are still interactable
     // despite being partially under the floor.
     if (component.IsUnderCover)
     {
         args.Cancel();
     }
 }