예제 #1
0
        /// <summary>
        /// Respawns the modified container back into the world
        /// </summary>
        public void RetrieveInsertedContainer()
        {
            EjectInsertedContainer();
            ItemStorage player = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>().ItemStorage;

            HandInsert(player);
        }
예제 #2
0
    /// <summary>
    /// Respawns the modified container back into the world
    /// </summary>
    public void EjectInsertedContainer()
    {
        ItemStorage player = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>().ItemStorage;

        InsertedContainer.GetComponent <CustomNetTransform>().AppearAtPositionServer(gameObject.WorldPosServer());
        HandInsert(player);
        hasContainerInserted = false;
        InsertedContainer    = null;
        ServerOnExternalTankInserted.Invoke(false);
    }
예제 #3
0
        /// <summary>
        /// Respawns the modified container back into the world - or into the player's hand, if possible.
        /// </summary>
        public void RetrieveInsertedContainer()
        {
            var gasContainer = InsertedContainer;

            EjectInsertedContainer();

            var playerScript = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>();
            var bestHand     = playerScript.DynamicItemStorage.GetBestHand();

            if (bestHand != null)
            {
                Inventory.ServerAdd(gasContainer, bestHand);
            }
        }