コード例 #1
0
        private void InsertIdFromHand(IEntity user, ContainerSlot container, IHandsComponent hands)
        {
            var isId = hands.GetActiveHand?.Owner.HasComponent <IdCardComponent>();

            if (isId != true)
            {
                return;
            }
            if (!hands.Drop(hands.ActiveIndex, container))
            {
                _notifyManager.PopupMessage(Owner.Transform.GridPosition, user, _localizationManager.GetString("You can't let go of the ID card!"));
                return;
            }
            UpdateUserInterface();
        }
コード例 #2
0
        private void InsertIdFromHand(IEntity user, ContainerSlot container, IHandsComponent hands)
        {
            var isId = hands.GetActiveHand?.Owner.HasComponent <IdCardComponent>();

            if (isId != true)
            {
                return;
            }

            if (hands.ActiveHand == null)
            {
                return;
            }

            if (!hands.Drop(hands.ActiveHand, container))
            {
                Owner.PopupMessage(user, Loc.GetString("You can't let go of the ID card!"));
                return;
            }
            UpdateUserInterface();
        }